Grunt
In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you've configured
To install grunt first you must have NodeJs installed, NodeJS will have npm (node packaged modules)
Run the following commands
- Install
grunt-cli
globally by running the following commandnpm install -g grunt-cli
- In you downloaded package from themeforest, navigate to
grunt/
directory and copy bothpackage.json
gruntfile.js
to your project root. e.g :getting_started
folder - Navigate to the root directory of your project, then run
npm install
.
Once you have successfully setup now you can use pages Grunt CLI commands to automate your task
Grunt Build
This will automatically minify your assets resources like css and js into a folder called
dist
Grunt Watch
This will automatically compile the pages Less files on save
Grunt Less
This will compile the pages Less files on execute once
Your are free to customize the Grunt task to your need by editing the gruntfile.js in the root directory of
getting_started
Should you encounter problems with installing dependencies or running Grunt commands, first delete the
/node_modules/
directory generated by npm. Then, rerun npm install
.Last modified 3yr ago