gulp-flow helps to organize and re-use a collection of tasks.
This is the base package to create a more sophisticated workflow.
gulp-flow requires Gulp 4.
If Gulp 4 is already installed, you can skip this step (go to install gulp-flow) 👍
npm uninstall gulp -gcd [your_project_root]npm uninstall gulp
npm install gulpjs/gulp-cli#4.0 -g
npm install --save-dev gulpjs/gulp.git#4.0
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.