gulp-install

Automatically install npm and bower packages if package.json or bower.json is found in the gulp file stream respectively

gulp-install

Automatically install npm and bower packages if package.json or bower.json is found in the gulp file stream respectively

Used as the install step when using slush as a Yeoman replacement.

Install gulp-install as a dependency:

npm install --save gulp-install

Install gulp-install as a development dependency:

npm install --save-dev gulp-install
var install = require("gulp-install");
 
gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install());
var install = require("gulp-install");
 
gulp.src(['./bower.json', './package.json'])
  .pipe(install());

To not trigger the install use --skip-install as CLI parameter when running slush or gulp.

Type: Boolean

Default: false

Set to true if npm install should be appended with the --production parameter when stream contains package.json.

Example:

var install = require("gulp-install");
 
gulp.src(__dirname + '/templates/**')
  .pipe(gulp.dest('./'))
  .pipe(install({production: true}));

MIT License