Skip to content

Commit

Permalink
build(gulp): upgrade to Gulp 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Adame committed Feb 24, 2021
1 parent 5257daa commit 8155481
Show file tree
Hide file tree
Showing 3 changed files with 704 additions and 465 deletions.
22 changes: 11 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ gulp.task('prepack', function(cb){
webpack('webpack.prepack.config.js', cb);
});

gulp.task('webpack-cordova', ['prepack'], function(cb){
gulp.task('webpack-cordova', gulp.series('prepack', function(cb){
webpack('webpack.cordova.config.js', cb);
});
}));

gulp.task('dist', ['prepack'], function(cb){
gulp.task('dist', gulp.series('prepack', function(cb){
webpack('webpack.library.config.js', cb);
});
}));

gulp.task('remap', ['webpack-cordova'], function () {
gulp.task('remap', gulp.series('webpack-cordova', function () {
return gulp.src(['dist/plugin.min.js', 'dist/www.min.js'])
.pipe(insert.prepend(remap))
.pipe(gulp.dest('dist'));
});
}));

gulp.task('plugin', ['remap'], function () {
gulp.task('plugin', gulp.series('remap', function () {
return gulp.src(['dist/plugin.min.js'])
.pipe(gulp.dest('src/browser'));
});
}));

gulp.task('www', ['remap'], function () {
gulp.task('www', gulp.series('remap', function () {
return gulp.src(['dist/www.min.js'])
.pipe(gulp.dest('www'));
});
}));

gulp.task('default', ['dist', 'plugin', 'www']);
gulp.task('default', gulp.series('dist', 'plugin', 'www'));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"conventional-changelog-cli": "^1.2.0",
"cz-conventional-changelog": "3.3.0",
"express": "^4.14.0",
"gulp": "^3.9.1",
"gulp": "^4.0.2",
"gulp-insert": "^0.5.0",
"husky": "^0.13.1",
"jshint": "^2.9.2",
Expand Down
Loading

0 comments on commit 8155481

Please sign in to comment.