This workflow gathers some cool tasks like compiling PUG files into HTML files, compiling SASS files into CSS files, minifying images and browser reloading.
First you need to install Node.js on your computer. Then open a terminal (Your favorite terminal will be perfect), and now go to the directory root with the following command:
cd path/to/the/directory/gulp-workflow
Here, you can install dependencies (you need to install yarn first). Run this command:
yarn install
It installs all dependancies found in the package.json
.
You need to install gulp globally with this command:
yarn add gulp -g
Then just run the following command line:
gulp
It executes the default task and launch the server.
I think it's better to show you this workflow in action. So the index.html
is a kind of documentation and it can help you with some option.
- V1.1 2019-07-07:
- Update gulp: 3.9.1 => 4.0.2 (resolve incompatibility Node >= 11)
- V1.04 2018-01-07:
- Replace
npm
byyarn
- Update
gulp-sass
version (resolvenode-sass
incompatibility with new versions of Node) - Update the doc
- Replace
- V1.03 2017-08-15:
- Replace
gulp-jade
bygulp-pug
- Fix some
gulpfile.js
errors
- Replace
- V1.02 2016-11-03:
- Now Browser reload the page when images and fonts are added to the project.
- Add a .gitignore for node_modules
- V1.01 2016-06-22:
- SASS
@import
with the official SASS specification for filenames. SASS files are now preceded by an underscore like_colors.scss
. - Fix the directory structure in jade too.
- SASS
- V1.0 2016-06-16: Initial release