1.0.3 • Published 9 years ago
gulp-automation-boilerplate v1.0.3
gulp-automation-boilerplate
Project tested with node v 6.2.2
A very basic boilerplate to start your Javascript project ideally with ES6 and Less css preprocessor.
The aim of this package is to start basic web project which usually have JS and css (less css) files, build them for release by compiling ES2015 code and concatenate js and css files into single bundle.
Bundling done with simple commands using Gulp which is famous build system to automate build process.
Install
First, clone the repo via git:
git clone https://github.com/mizmaar3/gulp-automation-boilerplate your-project-nameAnd then install dependencies.
$ cd your-project-name && npm installBuild
Run this command to build and bundle the project.
$ npm run buildor simple run
$ gulpinside your project folder
Start Server
To start local server please run
$ npm run startand goto http://127.0.0.1:9400 to test if code worked. You should get some text on the page.
DevTools
Toggle Chrome DevTools
- OS X: Cmd Alt I or F12
- Linux: Ctrl Shift I or F12
- Windows: Ctrl Shift I or F12
Example Code Explanation
The JS folder
- JS folder contains two js files
script1.jsxwhich has anES6arrow function andscript2.jswhich have simple javascript function. Both will be compiled withBabel.jsusingES2015presents and minified in singlemain.jsfile insidedistfolder after building the project.
The LESS folder
- Less folder contains
.lessfiles which will be compiled withgulp-lessand concatenated into single filestyle.css, can be found indistfolder after building project.