Setting Up Ember CLI with CoffeeScript
Ember CLI is a powerful command line utility for Ember.js. By default, Ember CLI generates JavaScript files for your ember application. However, you can enable CoffeeScript easily.
Create a new Ember CLI application:
Next, install ember-cli-coffeescript addon.
Note: This addon requires Ember CLI version more than 0.2.0.
Let’s modify the app.js
to app.coffee
We are almost done. Now, let’s modify router.js
to router.coffee
.
Lastly, run ember server
. You should see “Welcome to Ember.js”. The next time you use ember generate
command, all files will be generated in CoffeeScript.
Now, you can start working on your ambitious web application using CoffeeScript!