gulp-tinstall
v0.4.0
Published
Automatically install npm and bower packages if package.json or bower.json is found in the gulp file stream respectively
Downloads
4
Readme
gulp-install
Automatically install npm and bower packages if package.json or bower.json is found in the gulp file stream respectively
Primary objective
Used as the install step when using slush
as a Yeoman replacement.
Installation
For global use with slush
Install gulp-install
as a dependency:
npm install --save gulp-install
For local use with gulp
Install gulp-install
as a development dependency:
npm install --save-dev gulp-install
Usage
In your slushfile.js
:
var install = require("gulp-install");
gulp.src(__dirname + '/templates/**')
.pipe(gulp.dest('./'))
.pipe(install());
In your gulpfile.js
:
var install = require("gulp-install");
gulp.src(['./bower.json', './package.json'])
.pipe(install());
Options
To not trigger the install use --skip-install
as CLI parameter when running slush
or gulp
.
options.production
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}));
options.ignoreScripts
Type: Boolean
Default: false
Set to true
if npm install
should be appended with the --ignore-scripts
parameter when stream contains package.json
. Useful for skipping postinstall
scripts with npm
.
Example:
var install = require("gulp-install");
gulp.src(__dirname + '/templates/**')
.pipe(gulp.dest('./'))
.pipe(install({ignoreScripts: true}));