What tools will you use in your EmberJs App?


#1
I only know grunt to compile all the hbs into one template file. How about others? For example, are there any tools which is able to allow me to concat all the controller files into one controller file? I also want to do the same way on all the view files, route files and so on. Thanks.

#2

ember-cli - the future.

tapas-with-ember - more stable than ember-cli. mutewinter knows what’s up.


#3

The specific build tool in ember-cli that will replace Grunt is called broccoli.


#4
Thank you guys, any more?
But if I only have grunt, am I able to concat all the controller files or route files into one?

#5

Oh! I misunderstood. The “concat” plugin will concatenate anything you want, and “cssmin” and “uglify” will min your code. The concat setup looks something like this:

concat: {
    css: {
       src: [
             'styles/*.css'
            ],
        dest: 'style.css'
    },
    js : {
        src : [
            'ember/config.js', 'ember/models/*', 'ember/views/*', 'ember/controllers/*', 'ember/routes/*', 'ember/components/*', 'ember/router.js', 'ember/functions/*', 'ember/fixtures/*', 'templates.js'
        ],
        dest : 'app.js'
    }
}

Checkout the full list of plug-ins here.


#6

So I can concat all the controller files into one controller file, all the route flies into one route file, and in my index.html, just import the compressed controller file and route file, the app will still run well, right?


#7

Yup! You can also concat your compiled templates with the rest of the files. One JS file, one CSS file, one index file and you’ve got an app.


#8
Thank you so much!!! This really saves me a lot of time

#9

I use lineman js which is a great workflow for ember handles all compilation and does everything grunt does and more. See http://linemanjs.com


#10
Thanks eibrahim, I'll also take a look at lineman as you mentioned :)