Skip to content

subodha/magento-2-gulp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magento-2-gulp

Gulp for Magento 2

Comparing with Grunt

Compilation of all themes (10 files):
Gulp: 16sec
Grunt 33sec

Custom theme compilation (2 files):
Gulp: 4.5s
Grunt: 11.2s

Installation

  1. Download as a zip file or clone this in to ur pc.

  2. Copy "gulpfile.js" and "package.json" in to the root directory (codepool)

  3. Install node.js for your OS: https://nodejs.org/en/

  4. Install modules: run a command in a root directory of your project "npm install".
    (If you alrady instaled Grunt please remove node_module directory)

How to run

  1. Run : gulp exec --theme ex: gulp exec --luma
    Or: php bin\magento dev:source-theme:deploy --locale="en_AU" --area="frontend"
    --theme="VendorName/themeName"

  2. Run : gulp deploy --theme ex: gulp deploy --luma
    Or: php bin\magento setup:static-content:deploy en_AU

  3. Run gulp command in the root directory with arguments or without. Examples:
    3.a. Compilation of all themes: gulp
    3.b. Compilation of certain theme: gulp less --luma
    3.c. Watcher of certain theme: gulp watch --luma
    3.d. Compilation of certain theme with minification (+~2.5s): gulp less --luma --min
    3.e. Compilation of certain theme with sourcemap(+~1.5s), can't be used with minification: gulp less --luma --map
    3.f. Compilation with live reload: gulp less --luma --live
    3.g. Watcher with liveReload: gulp watch --luma --live

  4. For using liveReload install extension for your browser: http://livereload.com/
    4.a. Turn on the extension on the page of project.

About

Gulp for Magento 2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5