Gulp

Build, serve and watch your project

To start your project run:
gulp

The gulp command will build, serve and watch the project with the following gulp tasks:

TaskAction
cleanDelete the following directories:
js/bootstrap
scss/bootstrap
pages/assets/css
pages/assets/js
pages/assets/lib
scssCompiles scss/theme.scss and generates theme.css and theme.map to the pages/assets/css/ directory.
js:bootstrapConcat the js files from js/bootstrap/ and transpiles with babel to bootstrap.js, bootstrap.min.js to the pages/assets/js/ directory.
js:customConcat the js files from js/custom/ and transpiles with babel to theme.js, theme.min.js to the pages/assets/js/ directory.
js:pluginsConcat the js files according to the Paths.JS.PLUGINS array declared in gulpfile.js and transpiles with babel to plugins.js and plugins.min.js to the pages/assets/js/ directory.
jsRun the following tasks parallelly:
  • js:bootstrap
  • js:custom
  • js:plugins
copy:dependencyCopies the dependencies from node_modules/ directory to pages/assets/ directory according to the Paths.DEPENDENCIES object declared in gulpfile.js.
watchAll of the following folders are monitored for changes, which will tell the browser to reload automatically after any changes are made:
pages/*.html
pages/assets/fonts/
pages/assets/video/
pages/assets/img/
scss/ 
js/
serveStarts a Browsersync instance on port 3000 served from pages, defaults to index.html.
Other available gulp tasks
TaskAction
scss:minCompiles scss/theme.scss and generates theme.min.css, and theme.min.map to the pages/assets/css/ directory.
scss:rtlCompiles scss/theme.scss and generates theme-rtl.css, and theme-rtl.map to the pages/assets/css/ directory.
scss:rtl:minCompiles scss/theme.scss and generates theme-rtl.min.css, and theme-rtl.min.map to the pages/assets/css/ directory.