caedes

French Rails developer

Recent Notes

Javascript build with Node and Grunt
Rack Cookie header issue
Maintaining scale on orientation change
Git command to clean repository

Gem things

enum_plus
mootools-plus-rails

JS things

mootools-plus
Fx.Engine

View My GitHub Profile

Javascript build with Node and Grunt

Here’s a way to create your own Javascript build with Node and Grunt.

First you should install Node.js

brew install node

Then git clone your JS repo.

git clone git://github.com/<alias>/<repo-name>.git

Enter the directory and install the Node dependencies.

npm install

Make sure you have grunt installed by testing:

grunt -version

If not try installing it with -g option.

npm install grunt -g

Then, to get a complete and a minified version of your Javascript sources:

grunt

Your Javascript built version will be put in the dist/ subdirectory.