gulp-flow helps to organize and re-use a collection of tasks.
This is the base package to create a more sophisticated workflow.
- >= Node v6 (v6 or +)
- >= Gulp v4 (v4 or +)
gulp-flow requires Gulp 4.
Install Gulp 4 (if not already installed)
If Gulp 4 is already installed, you can skip this step (go to install gulp-flow) 👍
Uninstall previous Gulp installation (if there is a Gulp installed less than v4)
npm uninstall gulp -gcd [your_project_root]npm uninstall gulp
Install Gulp 4 CLI tools globally from 4.0 GitHub branch
npm install gulpjs/gulp-cli#4.0 -g
Install Gulp 4 into your project
npm install --save-dev gulpjs/gulp.git#4.0
Install Gulp flow
npm install --save-dev gulp-flow
let flow = ;
If you are an Unix user, to be able to support natively the modern JS features (ES6 / ES7) in your tasks scripts (without transpiler), you can add in your
.bash_aliases) file this alias:
# run Gulp with some features of ES6/ES7alias gulp='node --es_staging `which gulp`'
Now you can write the modern JS (supported by Node.js) in your gulpfile.js:
let cfg gp pipes utils envList = ;
gulp-flow use the envlist module to finely manage and consolidate the environments.
See envlist module for more details.
or (recommended way)
// cfg.env output: devconsole;// NODE_ENV output: development// Why? Because it's a convention of the Node.js sphere ;)// See envlist module for more detailsconsole;console;
Also you can ensure the environment directly in your tasks with
or the shortcut
MIT (c) 2016, Nicolas Tallefourtane.