Build, Serve and Watch: gulp
Running gulp
in the Wingman folder will compile the sources to dist
then start a local Browsersync instance on port 3000
to serve and refresh
your pages as you edit.
The default task runs the following operations:
- clean:dist : The
dist
folder is emptied. All files indist
are deleted. - html: All
.html
files are copied frompages
todist
. Only newer files are copied. - sass-min: Compiles
theme.css
andtheme.min.css
fromscss/theme.scss
to thedist/assets/css
along with appropriate.map
files. - bootstrap-js: Compiles and minifies all Bootstrap javascript files to
bootstrap.js
andbootstrap.min.js
in thedist/assets/js
folder. - mrare-js: Compiles and minifies all Medium Rare javascript files to
theme.js
andtheme.min.js
in thedist/assets/js
folder. - copy-assets: Copies any newer files from
pages/assets
todist/pages/assets
. - serve: Starts a Browsersync instance on port
3000
served fromdist
, defaults toindex.html
. - watch: Monitors the following files and runs the corresponding tasks:
pages/*.html
, then runs the html task.scss/*.scss
, then runs the sass-min task.js/bootstrap/*.js
: then runs the bootstrap-js task.js/mrare/*.js
: then runs the mrare-js task.assets/*.*
: then runs the copy-assets task.
NOTE: Medium Rare javascript is linted through gulp-eslint according to the Airbnb rules preset,
and is configured in the .eslintrc.json
file in the project root. If the linting fails, the Gulp process will quit with an error. If you edit any Medium Rare javascript files and encounter a linting error,
simply correct the error and re-run gulp
. This is done to prevent distribution of unlinted code.
The Browsersync server and Gulp's watch task will continue to run until instructed to quit via Ctrl+C or if the terminal/command window is closed.
When the server process quits, the dist
folder is left intact with the latest version of compiled files within.