Skip to content

Commit

Permalink
Bump gulp from 3.9.1 to 4.0.2 (#2200)
Browse files Browse the repository at this point in the history
Bumps [gulp](https://github.com/gulpjs/gulp) from 3.9.1 to 4.0.2.
- [Release notes](https://github.com/gulpjs/gulp/releases)
- [Changelog](https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md)
- [Commits](gulpjs/gulp@v3.9.1...v4.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Areeb Jamal <jamal.areeb@gmail.com>
  • Loading branch information
dependabot-preview[bot] and iamareebjamal authored Mar 7, 2020
1 parent 87ee476 commit 15d7e9b
Show file tree
Hide file tree
Showing 3 changed files with 859 additions and 352 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
"body-parser": "^1.15.2",
"chai": "^4.0.1",
"compression": "^1.6.2",
"cookie-parser": "^1.4.4",
"connect-domain": "^0.5.0",
"cookie-parser": "^1.4.4",
"decompress-zip": "^0.3.0",
"del": "^5.1.0",
"dotenv": "^8.2.0",
"express": "^4.13.4",
"express-session": "^1.15.0",
Expand All @@ -45,7 +46,7 @@
"fs-extra": "^3.0.1",
"ftp-deploy": "^2.3.6",
"github": "^9.2.0",
"gulp": "^3.9.1",
"gulp": "^4.0.2",
"gulp-babel": "^6.1.2",
"gulp-clean": "^0.4.0",
"gulp-concat": "^2.6.1",
Expand Down
17 changes: 9 additions & 8 deletions src/backend/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const concat = require('gulp-concat');
const minify = require('gulp-minify-css');
const htmlmin = require('gulp-htmlmin');
const iife = require('gulp-iife');
const clean = require('gulp-clean');
const del = require('del');
// eslint-disable-next-line no-var
var exports = module.exports = {};

exports.minifyJs = function(path, cb) {
const dir = path + '/js/';

gulp.task('scheduleJs', function() {
return gulp.src([dir + 'FileSaver.js', dir + 'social.js', dir + 'scroll.js', dir + 'navbar.js', dir + 'calendar.js', dir + 'popover.js', dir + 'html2canvas.js', dir + 'jquery.lazyload.js', dir + 'icsGen.js'])
return gulp.src([dir + 'FileSaver.js', dir + 'social.js', dir + 'scroll.js', dir + 'navbar.js', dir + 'calendar.js', dir + 'popover.js', dir + 'html2canvas.js', dir + 'jquery.lazyload.js', dir + 'icsGen.js'], {allowEmpty: true})
.pipe(iife({useStrict: false}))
.pipe(concat('schedule.min.js'))
.pipe(babel({presets: ['es2015']}))
Expand Down Expand Up @@ -60,6 +60,7 @@ exports.minifyJs = function(path, cb) {
});

gulp.task('speakersJs', function() {
console.log('>>> Generating speakers.js')
return gulp.src([dir + 'social.js', dir + 'scroll.js', dir + 'navbar.js', dir + 'popover.js', dir + 'jquery.lazyload.js'])
.pipe(iife({useStrict: false}))
.pipe(concat('speakers.min.js'))
Expand Down Expand Up @@ -91,12 +92,12 @@ exports.minifyJs = function(path, cb) {
.pipe(gulp.dest(path + '/js/'));
});

gulp.task('minifyJs', ['speakersJs', 'roomsJs', 'scheduleJs', 'eventJs', 'tracksJs', 'sessionJs', 'mainJs'], function() {
gulp.src(['!' + dir + '*.min.js', dir + '*.js']).pipe(clean());
gulp.task('minifyJs', gulp.series('speakersJs', 'roomsJs', 'scheduleJs', 'eventJs', 'tracksJs', 'sessionJs', 'mainJs', async function() {
await del([dir + '*.js', '!' + dir + '*.min.js']);
cb();
});
}));

gulp.start('minifyJs');
gulp.series('minifyJs')();
};

exports.minifyCss = function(path, cb) {
Expand All @@ -109,7 +110,7 @@ exports.minifyCss = function(path, cb) {
});
});

gulp.start('minifyCss');
gulp.series('minifyCss')();
};

exports.minifyHtml = function(path, cb) {
Expand All @@ -122,5 +123,5 @@ exports.minifyHtml = function(path, cb) {
});
});

gulp.start('minifyHtml');
gulp.series('minifyHtml')();
};
Loading

0 comments on commit 15d7e9b

Please sign in to comment.