Looking for the right development tool / workflow

Hey folks!

While I’m not entirely new to Ember.js I still struggle to find a development tool / workflow which is not a pain in the ass at some point.

Basically I’m looking for something that fulfils my wish list:

  • Compiles CoffeeScript
  • Compiles SASS
  • Manages Handlebars templates in separate files
  • Uses non-minified Ember.js in development
  • Has a development server which supports the History API (don’t try to display ‘/projects/1’, just respond with the index.html)
  • Allows me to build a production release
  • A production release is minified, concatenated and uses the minified Ember.js version
  • A production release has fingerprinted (a hash in the filename) assets so I can cache very aggressively
  • Isn’t hostile to testing

I hope someone can point me into a direction, thanks a lot!

I suggest Yeoman combined with generator-ember. I’m pretty sure this fulfills every requirement.

If you are up for using Rails, you can use ember-rails which does this also, however you would be married to Rails at that point.

Iridium looks promising for this kind of thing, but I haven’t tried it yet. There are a few Ember skeleton apps for it on GitHub:

https://github.com/radiumsoftware/iridium-ember

https://github.com/darthdeus/iridium-ember-skeleton

rails + ember-rails provides all of these features.

  • CoffeeScript, SASS: Just add coffee-rails and sass-rails to your Gemfile
  • Manages Handlebars templates in separate files: Part of ember-rails. You can have multiple root folders for multiple apps as well.
  • Uses non-minified Ember.js in development: Add one line to your environment’s config. config.ember.variant = :development
  • Has a development server which supports the History API: This is not included, but very straightforward to implement yourself. Just add the same routes in your Ember app to you routes.rb, or use a catch all route, and redirect them to the same controller action in Rails.
  • Allows me to build a production release: Part of rails.
  • A production release is minified, concatenated and uses the minified Ember.js version: Part of rails.
  • A production release has fingerprinted (a hash in the filename) assets: Part of rails. Precompiled assets include an MD5 digest in the file name. See The Asset Pipeline.
  • Isn’t hostile to testing: I don’t have much experience with testing, but I’ve seen that Rails has a lively testing culture.

I think that https://github.com/heartsentwined/ember-auth-rails-demo/wiki is a great introduction to setting up ember-rails and testing, even if you skip over the ember-auth/devise stuff.

1 Like

I recommend, Brunch, Grunt or MimosaJS. These solutions meet all you need, but try and choose

Also check: EmberJS + Brunch.io VS EmberJS + Yeoman VS EmberJS + MimosaJS

Mimosa will do these:

  • Compiles CoffeeScript
  • Compiles SASS (node or Ruby)
  • Manages Handlebars templates in separate files
  • Uses non-minified Ember.js in development
  • Has a development server which supports the History API (don’t try to display ‘/projects/1’, just respond with the index.html)
  • Allows me to build a production release
  • Isn’t hostile to testing

That’s mostly all out of the box behavior. Using Ember itself has some somewhat boilerplate config to include that you can see here: https://github.com/breathe/mimosa-peepcode

It’ll do this…

  • A production release is minified, concatenated and uses the minified Ember.js version

… if you are using RequireJS

It doesn’t do this…

  • A production release has fingerprinted (a hash in the filename) assets so I can cache very aggressively

…but it would probably be easy to add.