Installing and configuring Grunt
- Install node.js to any location on your machine.
- Install Grunt CLI tool globally. To do this, run the following command in a command prompt:
npm install -g grunt-cli
- Install Grunt in your Magento directory. To do this, run the following commands in a command prompt:
cd <your_Magento_instance_directory> npm install grunt --save-dev
- Install (or refresh) the node.js project dependency for your Magento instance. To do this, run the following commands in a command prompt:
cd <your_Magento_instance_directory> npm install npm update
- Add your theme to Grunt configuration. To do this, in the dev/tools/grunt/configs/theme.js file
- If you want to use Grunt for “watching” changes automatically, without reloading pages in a browser each time, install the LiveReload extension in your browser.
- Check the video for complete Magento 2 installation, creating theme, installing and configuring grunt and some debugging. Magento 2 Installation