Magento 2 Theming with Grunt / Less Part 2


Installing and configuring Grunt

  1. Install node.js to any location on your machine.
  2. Install Grunt CLI tool globally. To do this, run the following command in a command prompt:
    npm install -g grunt-cli
  3. 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
  4. 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
  5. Add your theme to Grunt configuration. To do this, in the dev/tools/grunt/configs/theme.js file
  6. 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.
  7. Check the video for complete Magento 2 installation, creating theme, installing and configuring grunt and some debugging. Magento 2 Installation

Gihan Kavinga

Technical lead at Netstarter PTY Ltd. Magento certified developer plus. Oracle certified professional Business Component Developer. Linux system admin.

Leave a Reply

  • (will not be published)