Skip to content

toandp/magento2-livereload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento 2 Livereload

Easy way to apply livereload for Magento 2 theme development

livereload

Installation

Install the latest version with

$ composer require tdpsoft/magento2-livereload

Basic Usage

Step 1: Install Grunt

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

Step 2: Install Livereload

$ 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

Step 3: Admin Setup

Go to Stores > Configuration > Advanced > Developer livereload

Author

Toan Dinh - [email protected] - https://fb.com/iamtoandinh

Contributing

Thank you for considering contributing to the Magento 2 Livereload! The contribution guide can be found in the contributors.

License

The Laravel framework is open-source software licensed under the MIT license.