Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting.
Installing Grunt
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 command
npm install -g grunt-cli
Gruntfile.js file is a valid JavaScript or CoffeeScript file that belongs in the root directory of your project, next to the package.json file, and should be committed with your project source.
Navigate to the root directory of your project, then run npm install.
Once you have successfully setup now you can use Grunt CLI commands to automate your task
Commands
grunt dist
This will automatically copy all the assets from node_modules to vendors folder
grunt sass
This will compile all the sass files to dist/css/style.css
grunt watch
This will automatically compile the sass files on changes