2

My core_config_data table has general/locale/code set to en_IE. When I run grunt exec:<theme-name> and then grunt less:<theme-name>, CSS is generated in two separate locale folders, en_GB and en_IE. Both have the correct output CSS.

However, when I run grunt watch and then change a LESS file, the change is registered and the page refreshes, but the change doesn't take effect in the browser. I can see that this is because the CSS is only updated in one locale (en_GB) and not the other (primary, en_IE).

Is there a way to tell grunt watch to refresh CSS for all locales at the same time?

3

I found the answer. I had added my theme to the dev/tools/grunt/configs/themes.js file, but had specified en_GB instead of en_IE.

To put it another way, the locale inside dev/tools/grunt/configs/themes.js didn't match that set in the core_config_data table.

-3

ow to 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. Rename 'Gruntfile.js.sample' to 'Gruntfile.js' And 'package.json.sample' to 'package.json'

  4. Install (or refresh) the node.js project dependency, including Grunt, for your Magento instance. To do this, run the following commands in a command prompt: cd your_Magento_directory_name

    npm install
    npm update
    
  5. Then use Grunt commands

  • Welcome to Magento SE. This might be useful but it does not answer the question at all. Answers on StackExchange should provide a solution for the question. This one answers a different question: "How to install and configure Grunt" – Fabian Schmengler Apr 20 '17 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.