This document provides an overview of Grunt, a JavaScript task runner. It discusses that Grunt allows automation of tasks like testing, linting, minification and more. Key points include that Grunt is open source, has a large community and plugins, and makes development easier by automating repetitive tasks. The document demonstrates how to install Grunt and its plugins via npm, and how to configure a Gruntfile to define and run tasks. Major companies and projects like jQuery, Yeoman and Twitter are highlighted as using Grunt.
1 of 20
More Related Content
Grunt - The JavaScript Task Runner
1. 1
GRUNT
THE JAVASCRIPT TASK
RUNNER
Mohammed Arif
Manager Interactive Development @ SapientNitro
www.mohammedarif.com
https://twitter.com/#!/arif_iq
http://in.linkedin.com/in/mohdarif
2. 2
AGENDA
What is grunt?
Why Grunt?
How Do I start?
npm
Node.js
How Do I Install it?
How Do I Use it?
Demo
Who have been using it?
Q & A
8. 8
HOW DO I START GRUNT?
http://gruntjs.com/getting-started
• npm
• node.js
9. 9
NPM?
npm {Node Packaged Modules} manages dependencies for an
application through the command line.
https://npmjs.org
10. 10
NODE.JS?
node.js is an open source command line tool built for the server side
JavaScript.
The JavaScript is executed by the V8 (Google's open source
JavaScript engine).
http://www.ibm.com/developerworks/library/os-nodejs/
11. 11
HOW DO I INSTALL GRUNT CLI
?
$ npm install -g grunt-cli
This will put the grunt command in your system path, allowing it to
be run from any directory.
* Note that installing grunt-cli does not install the grunt task runner!
You need to install Grunt's command line interface (CLI) globally.
12. 12
HOW DO I INSTALL GRUNT?
$ npm install grunt –-save-dev
This will install the latest version of Grunt in your project folder,
adding it to your devDependencies in package.json
* Same way you can install the grunt plugins i.e. npm install {module} --save-dev
13. 13
HOW DO I USE GRUNT?
• package.json
• GruntFile.js