update gulp to 4.x

This commit is contained in:
Danny van Kooten 2018-10-30 16:14:36 +01:00
parent 036c369333
commit 5c69fb61ec
3 changed files with 1464 additions and 427 deletions

View File

@ -12,9 +12,7 @@ const babel = require('gulp-babel');
const cachebust = require('gulp-cache-bust'); const cachebust = require('gulp-cache-bust');
const debug = process.env.NODE_ENV !== 'production'; const debug = process.env.NODE_ENV !== 'production';
let defaultTasks = [ 'app-js', 'tracker-js', 'sass', 'html', 'img', 'fonts' ] ;
gulp.task('default', defaultTasks);
gulp.task('app-js', function () { gulp.task('app-js', function () {
let stream = browserify({ let stream = browserify({
@ -75,10 +73,12 @@ gulp.task('sass', function () {
.pipe(gulp.dest(`./assets/build/css`)) .pipe(gulp.dest(`./assets/build/css`))
}); });
gulp.task('watch', ['default'], function() { gulp.task('default', gulp.series('app-js', 'tracker-js', 'sass', 'html', 'img', 'fonts' ) );
gulp.task('watch', gulp.series('default', function() {
gulp.watch(['./assets/src/js/**/*.js'], ['app-js', 'tracker-js'] ); gulp.watch(['./assets/src/js/**/*.js'], ['app-js', 'tracker-js'] );
gulp.watch(['./assets/src/sass/**/**/*.scss'], ['sass'] ); gulp.watch(['./assets/src/sass/**/**/*.scss'], ['sass'] );
gulp.watch(['./assets/src/**/*.html'], ['html'] ); gulp.watch(['./assets/src/**/*.html'], ['html'] );
gulp.watch(['./assets/src/img/**/*'], ['img'] ); gulp.watch(['./assets/src/img/**/*'], ['img'] );
gulp.watch(['./assets/src/fonts/**/*'], ['fonts'] ); gulp.watch(['./assets/src/fonts/**/*'], ['fonts'] );
}); }));

1887
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
"@babel/preset-env": "^7.0.0", "@babel/preset-env": "^7.0.0",
"babelify": "^10.0.0", "babelify": "^10.0.0",
"browserify": "^16.2.0", "browserify": "^16.2.0",
"gulp": "^3.9.1", "gulp": "^4.0.0",
"gulp-babel": "^8.0.0", "gulp-babel": "^8.0.0",
"gulp-cache-bust": "^1.4.0", "gulp-cache-bust": "^1.4.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",