Is it possible to work on the UI side w/o having to run rails server?

(Salman, Freelance Developer) #1

The way things are setup now, is it possible to work on the ember.js UI side of things without actually having the development rails server running?

I’d imagine you would have to mock the json responses…

Requiring modules without using Rails asset pipeline
(Sam Saffron) #2

No… but I would totally love to have this … its a brilliant idea.

(Salman, Freelance Developer) #3

I was looking at the source of ghost, and I think that is how they have it setup I could be wrong.

Anyhow, what would it take as it seems the main folder is symbolic linked to the /jsapp folder.

You would probably need to use something like grunt to build the project, and then when doing rails development you would need to somehow link the 2 projects together with something like foreman so that a change in the js side of things would rebuild so you would see the changes reflected on your running rails s during development.

(Sam Saffron) #4

@eviltrout has a long term plan in this department, he can expand a bit here.

(Robin Ward) #5

It is a long term plan that begins with the ES6ification of Discourse, which is currently well underway.

Once all of the Javascript has been converted to .es6, we can switch over to ember-cli. Users will be able to check out the project, type ember serve on the command line and start hacking away without having to worry about getting rails and all its dependencies up and running.

In order to get at our API server, ember-cli includes a proxy. So I’ll likely set it up so that if you have a rails server running locally it’ll contact that. If not, it’ll go out and use a public site, such as, so you can develop locally but with a full data API to create posts, etc.

The only thing I can’t say is when we’ll get there, because it’s a lot of work to convert the existing site over to es6. I’m still averaging about 30 mins a day on it though, so at some point we’ll be able to really play with it.

(Dave McClure) #6

Wouldn’t this plan kind of allow this?

(Robin Ward) #7

Yup. The proxy will be able to go anywhere so you could access any API compatible instances.