Introduction to GruntJS

Developing in Javascript (in that case for frontend web-development) always feels manual provided you came across this nice library called GruntJS.
As the name suggests, it takes the grunt work out of the developers workflow. The repetitive and manual tasks could be automated with this nice library.
GruntJS requires NodeJS. Well, actually it does not require, it works on NodeJS. So the basic to get started is NodeJS. Once NodeJS is installed, one need to install GruntJS, locally per project. As of version 0.4, it is advised to uninstall the globally installed GruntJS module.
Must haves :
1. NodeJS installed
2. GruntJS installed locally.
3. Must uninstall GruntJS globally (if its already installed globally).

npm uninstall -g grunt

Link to the NPM Grunt package is here.

There we go, the basic setup to get started with our grunt work. Now to work with GruntJS, we need two files, which are as below;
1. Gruntfile.js (previously it was called grunt.js)
2. package.json
These two files are to be present right next to the locally installed GruntJS NPM module rather its the other way round. After deciding a place for GruntJS setup, in your work environment for the project, install the NPM modules locally in that folder. Next we can make these two files in the same folder.

The last and most notable task is to install the dependent task packages locally. These are the tasks we want to give GruntJS. For example, if we want to minify a JS file using UglifyJS, then we must install it locally for the project before using it.

npm install grunt-contrib-uglify

Finally, to fire up the grunt work, open the command prompt and navigate to the folder where we have the above two files and type;

grunt

Here is the github link to the setup, if you want to directly jump into the code.

Thats all, keep the grunt work to GruntJS.
Happy coding.