Posts

Showing posts from February, 2022

How to setup Grunt in Magento2 – OX Software

Image
  Magento comes with pre-configured grunt tasks for compiling LESS files. Make sure that you set your Magento application to the developer or default mode. We have to follow the below steps to install and configure. Install nodeJS To do this, run the following command in a command prompt: $ sudo apt install curl $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - $ sudo apt install nodejs Install Grunt CLI globally To do this, run the following command in a command prompt: $ npm install -g grunt-cli Create the files Move to your  Magento_root  directory and type the following commands $ cp package.json.sample package.json $ cp Gruntfile.js.sample Gruntfile.js $ cp grunt-config.json.sample grunt-config.json Install (or refresh) the node.js project dependency $ cd  Magento_root $ npm install $ npm update Grunt configuration file Copy the contents of themes.js into local-themes.js in the dev/tools/grunt/configs/ dir