Easy way to apply livereload for Magento 2 theme development
Install the latest version with
$ composer require tdpsoft/magento2-livereload
Important: be sure that you are in developper mode
, in root
project location when you execute the command bellow.
Rename the package.json.sample
to package.json
, grunt-config.json.sample
to grunt-config.json
, Gruntfile.js.sample
to Gruntfile.js
Grunt theme configuration: dev/tools/grunt/configs/themes.js
module.exports = {
...
yourtheme: {
area: 'frontend',
name: '<Vendor>/<yourtheme>',
locale: 'en_US', // Your locale
files: [
'css/styles-m',
'css/styles-l',
'css/custom' // For custom.less
],
dsl: 'less'
...
}
Run Grunt watch, See More informations
$ npm install -g livereload
Make sure that the liveReload is well installed, livereload -v
should output the version something like : 0.8.0
Install the LiveReload browser extension
, available for Chrome and Firfox
Go to Stores > Configuration > Advanced > Developer
Toan Dinh - [email protected] - https://fb.com/iamtoandinh
Thank you for considering contributing to the Magento 2 Livereload! The contribution guide can be found in the contributors.
The Laravel framework is open-source software licensed under the MIT license.