Revision History: EmberJS
How I learnt EmberJS and Coffeescript and Git
I'll be using the tutorial at http://emberjs.com/guides/getting-started.
- Install Sublime Text 2 as an IDE, along with node.js (which installs npm)
- Install the Sublime Linter by checking out SublimeLinter into your ST2 packages directory (since Sublime Linter is ST3 now): %APPDATA%Sublime Text 2Packages. This will give you things like PHP syntax error checking.
- Install Node.js which will also install NPM (Node.js package manager)
- Use npm to install coffeescript: npm install -g coffee-script
- Check that coffeescript is working: coffee -v
- Install the CoffeeScript ST2 plugin by going Preferences > Package Control > Install Package > (wait for list to load) > CoffeeScript
- Sublime Text should now support coffeescript linting. (I couldn't get this to work properly yet.)
- Edit the csslint settings because they are pretty insane. Preferences > Package Settings > SublimeLinter > Settings - Default and change csslint_options: ids to false, overqualified-elements to false
- Create a new Github repository https://github.com/soundasleep/todomvc-emberjs-coffee
- Checkout: git clone https://github.com/soundasleep/todomvc-emberjs-coffee
- Update push.default on git to a more intuitive value (and also removes a warning): git config --global push.default simple
- Follow the instructions in the EmberJS getting started tutorial, committing and pushing as necessary.
- Try to Cake building; unfortunately I couldn't get this to work because of win32 problems
- Install Grunt for building Coffeescript instead: npm install -g grunt
- Install the Grunt CLI: npm install -g grunt-cli
- Create a package.json. Understanding package.json
- Create a Gruntfile.js.
- Install all of the necessary packages referenced in the Gruntfile: npm install grunt-contrib-uglify grunt-contrib-qunit grunt-contrib-concat grunt-contrib-watch --save-dev. --save-dev will also modify package.json with the new dependencies (under devDependencies).
- Install https://github.com/gruntjs/grunt-contrib-coffee to compile coffeescript in Grunt: npm install grunt-contrib-coffee --save-dev
- You can now compile Coffeescript by running grunt coffee. You can also configure Grunt to watch for new files by modifying your Gruntfile and running grunt watch.
- Configure Sublime Text to treat Handlebars templates as HTML: HTML syntax validation within Handlebars templates in Sublime Text 2