Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.86 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.86 KB

sitecore-frontends-boilerplate

This projects aims to be a starting point to making HTML markup for sitecore solution.

Features

  • Sass
  • EcmaScript 2015 support using Babeljs
  • Bundling all sources using Webpack
  • Dev-server with hot-module-replacement plugin for Webpack
  • Sources optiomization for production build

Install

  1. Clone this repository — git clone https://github.com/platov/sitecore-frontends-boilerplate.git
  2. Install dependencies — npm install
  3. Install Gulp globally — npm install gulp-cli -g

Usage

gulp — build project with production or development settings related to host process.env.NODE_ENV variable
gulp prod — build project with production settings
gulp server — build project with development settings

Production build

This task will optimize html and javascript source code using html-minifier and uglifyJS2, bundle and put to the distribution folder

Development build

This task runs webpack-dev-server with hot-module-replacement plugin.

The webpack-dev-server is a little node.js Express server, which uses the webpack-dev-middleware to serve a webpack bundle. It also has a little runtime which is connected to the server via Socket.IO. The server emits information about the compilation state to the client, which reacts to those events...” read more

By default webpack-dev-server configured to listen on localhost:8080

hot-module-replacement plugin allows you to see your code changes without refreshing the page. read more