Auto update all node modules
npm install gulp-update-modulgulp-update-modul as dependency:
shell
npm install gulp-update-modul --save-dev
`
Usage
Then, add it to your gulpfile.js:
`javascript
var upmodul = require("gulp-update-modul");
gulp.task('update-modul', function () {
gulp.src('package.json')
.pipe(upmodul('latest', 'false')); //update all modules latest version.
});
`
Example
`javascript
var upmodul = require("gulp-update-modul");
//watch
gulp.task('watch', function () {
gulp.start('update-modul');
});
//update-modul
gulp.task('update-modul', function () {
gulp.src('package.json')
.pipe(upmodul('latest', 'false')); //update all modules latest version.
});
`
`javascript
var upmodul = require("gulp-update-modul");
//watch
gulp.task('watch', function () {
gulp.start('update-modul');
});
//update-modul
gulp.task('update-modul', function () {
gulp.src('package.json')
.pipe(upmodul('latest, true')); //update all modules latest version.
});
``