From 94760c0680a12f65e376328744ea126d2383bcf5 Mon Sep 17 00:00:00 2001 From: Albert Patterson Date: Sat, 8 Dec 2018 12:23:35 -0500 Subject: [PATCH] update build and dependencies to eliminate known vulnerabilities --- gulpfile.js | 27 +++++++++++++-------------- package.json | 8 ++++---- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1298814..0572039 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,4 @@ const gulp = require('gulp'); -const path = require('path'); -const runSequence = require('run-sequence'); const connect = require('gulp-connect'); const livereload = require('gulp-livereload'); const run = require('gulp-run'); @@ -16,24 +14,25 @@ const paths = { // connects the server at given port and root. // enables the live reloading. -gulp.task('connect', () => { - return connect.server({ +gulp.task('connect', done => { + connect.server({ livereload: true, root: paths.distDir, port: port }); + done(); }); -gulp.task('listen', ()=>{ - livereload.listen(); +gulp.task('listen', done => { + livereload.listen(done); }); -gulp.task('connect-and-listen', ()=>{ - runSequence('connect', 'listen'); -}); -gulp.task('reload', function(){ +gulp.task('connect-and-listen', gulp.series('connect', 'listen')); + +gulp.task('reload', done => { livereload.reload(); + done(); }); // use gulp-run in the middle of a pipeline: @@ -42,11 +41,11 @@ gulp.task('rebuild', function() { }); gulp.task('watch', ()=>{ - gulp.watch(["src/**/*"], ['rebuild']); + return gulp.watch(["src/**/*"], gulp.series('rebuild')); }); gulp.task('zip', function(){ - gulp.src(['dist/unpacked/**']) - .pipe(gzip('extension.zip')) - .pipe(gulp.dest('dist')) + return gulp.src(['dist/unpacked/**']) + .pipe(gzip('extension.zip')) + .pipe(gulp.dest('dist')) }) \ No newline at end of file diff --git a/package.json b/package.json index 817e870..9ad0c09 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "copy-webpack-plugin": "^4.5.1", "css-loader": "^0.28.11", "file-loader": "^1.1.11", - "gulp": "^3.9.1", + "gulp": "^4.0.0", "gulp-connect": "^5.5.0", - "gulp-livereload": "^3.8.1", + "gulp-livereload": "^4.0.1", "gulp-run": "^1.7.1", "gulp-zip": "^4.1.0", "html-loader": "^0.5.5", @@ -38,8 +38,8 @@ "run-sequence": "^2.2.1", "sass-loader": "^7.0.1", "style-loader": "^0.21.0", - "webpack": "^4.8.1", - "webpack-cli": "^2.1.3", + "webpack": "^4.20.2", + "webpack-cli": "^3.1.1", "webpack-dev-server": "^3.1.4", "webpack-merge": "^4.1.2", "webpack-shell-plugin": "^0.5.0"