This projects aims to be a starting point to making HTML markup for sitecore solution.
- 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
- Clone this repository —
git clone https://github.com/platov/sitecore-frontends-boilerplate.git
- Install dependencies —
npm install
- Install Gulp globally —
npm install gulp-cli -g
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
This task will optimize html and javascript source code using html-minifier and uglifyJS2, bundle and put to the distribution folder
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