What is Grunt.js?
- Minify, Concatenate,
- Watch files, Live Reload
- Different tasks to run different
- Close to 2,000 plugins to
I need to install grunt
how does it work?
Run grunt from the command line
Anatomy of a gruntfile
ANATOMY OF A GRUNTFILE
grunt.initConfig( object );
Sets up your tasks with options and target files
grunt.loadNpmTasks( string );
Load each NPM Task you will use
grunt.registerTask( string, array );
Set up a command line option to run specific tasks
How to get those plugins
Via the command line, of course!
Install a package:
--save-dev saves it to your package.json file
This is a lightning talk
Grunt.js is awesome. Use it to:
Identify repetitive tasks you do while developing
Starting a web server, refreshing the browser,
creating sprite maps, compressing images,
concatenating and minifying CSS and JS,
upload to FTP, building production files,
These are beneficial for you and everyone
else who works on your project.
If someone else doesn't own Coda, or PHP Storm,
they can still use SASS, they can still utilize
Live Reload, they can still build the same files as you.
Plus, you get to say Grunt a lot.
Cue childish IRC jokes.
Learn about the package.json file
In-depth look at Grunt.js (paid membership)
By Kalen Johnson