Grunt is a workflow / task automation tool.
Built on top of Node.js.
Primary focus is web development.
Awesome range of plugins.
A workflow / task automation tool
Build automation is the act of scripting or automating a wide variety of tasks
that software developers do in their day-to-day activities including things like:
compiling computer source code into binary code
packaging binary code
deployment to production systems
creating documentation and/or release notes
Built on top of
It’s better than…
● Shell scripts / Batch files
➔ It’s modular, and manages its own dependencies in a
clean, source-control friendly way.
Watch filesystem for changes
Create arbitrary files
Start a simple web server
Replace text in files
Launch a browser
Get tags from Git
Compile SASS files
Create Zip/Tar/Gz files
Empty a directory
Symlinks for web server
Generate a static website from templates
JS Static code analysis
Upload/Download from AWS S3
Grunt does two really useful things.
➔ It ties your plugins together
and runs them in a specific order.
➔ It normalises (to a certain extent) the format in which
you supply options to the plugins.
As an added bonus…
➔ Grunt + NPM helps manage build dependencies.
Time for another trick.
...installing a project from scratch.
➔ It’s a standard part of Node.js
➔ It describes your project, including its dependencies.
➔ It gets auto-updated as you ‘install’ additional plugins for
➔ Create one using npm init
➔ Auto-add dependencies by installing them with the -save-dev flag