
For the watch and livereload, you need to specify which files to watch, and. In browser, sometimes you will get an error in console stating failed to connect, simply hard refresh the page a few times until chrome decides to connect properly. You need node:true in your jshint config, take a look at this example. Once it is installed, you can run grunt watch and select the live reload extension button, it should allow you to connect.(Optional) 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.To use livereload functionality, you must install a browser extension To get ready to use Grunt watch for live reload capabilities, you need to run grunt exec:, grunt less: and then grunt watch in that order.Once you have added your custom theme to the theme.js file, remove all the files in pub/static and remove the var/generation and var/view_preprocessed and var/di, with a command like rm -rf pub/static/* var/view_preprocessed var/generation var/di.'css/styles-l' //path to root source file
#GRUNT CONNECT LIVERELOAD EXAMPLE HOW TO#
But for a while, we dont know how to run grunt live reload with our own Node JS server. 'css/styles-m', //path to root source file We are using grunt for our front end project and it works great.

The readme seems to skip over everything that I need explained, and then ends with an example that doesn't work when I try it and doesn't seem directly related to the documentation. Next, you will need to add your custom themes to dev/tools/grunt/configs/theme.js and example is below: 51 I'm trying to use grunt-contrib-livereload, but can't seem to figure it out.Once all the packages have been installed in the project, ensure your Magento 2 installation is in dev mode.Once this is complete simply install the packages that are listed in package.json by using the following command.You will need to rename two files, rename Gruntfile.js.sample to Gruntfile.js, next rename to package.json.(The directory where Magento 2 is installed). Next, navigate to your Magento 2 web root.Afterwards, you will need to install grunt-cli globally.

First, install node.js on your server, which is easily done, just follow instructions.
