Skip to content

Commit

Permalink
Update to gulp 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Nov 24, 2019
1 parent eba26fe commit 46176ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gulp.task("clean-dist", function(cb) {
rimraf("dist", cb);
});

gulp.task("clean", ["clean-docs", "clean-dist"]);
gulp.task("clean", gulp.series("clean-docs", "clean-dist"));

gulp.task("psc", function() {
return purescript.compile({
Expand All @@ -48,14 +48,14 @@ gulp.task("psc", function() {
});
});

gulp.task("bundle", ["psc"], function() {
gulp.task("bundle", gulp.series("psc", function() {
return purescript.bundle({
src: "output/main/**/*.js",
output: "dist/main.js",
module: "Main",
main: "Main"
});
});
}));

gulp.task("psc:cli", function() {
return purescript.compile({
Expand All @@ -65,14 +65,14 @@ gulp.task("psc:cli", function() {
});
});

gulp.task("bundle:cli", ["psc:cli"], function() {
gulp.task("bundle:cli", gulp.series("psc:cli", function() {
return purescript.bundle({
src: "output/cli/**/*.js",
output: "dist/cli.js",
module: "Main",
main: "Main"
});
});
}));

gulp.task("psci", function () {
return purescript.psci({
Expand All @@ -88,22 +88,22 @@ gulp.task("less", function() {
.pipe(gulp.dest("dist"));
});

gulp.task("concat", ["bundle"], function() {
gulp.task("concat", gulp.series("bundle", function() {
return gulp.src([
"bower_components/Sortable/Sortable.min.js",
"dist/main.js"
])
.pipe(concat("main.js"))
.pipe(gulp.dest("dist"));
});
}));

gulp.task("compress", ["concat"], function() {
gulp.task("compress", gulp.series("concat", function() {
return gulp.src("dist/main.js")
.pipe(uglify())
.pipe(gulp.dest("dist"));
});
}));

gulp.task("docs", ["clean-docs"], function () {
gulp.task("docs", gulp.series("clean-docs", function () {
return purescript.docs({
src: sources,
docgen: {
Expand All @@ -117,8 +117,8 @@ gulp.task("docs", ["clean-docs"], function () {
"Unsafe": "docs/Unsafe.md"
}
});
});
}));

gulp.task("prod", ["clean", "less", "psci", "bundle:cli", "bundle", "concat", "compress", "docs"]);
gulp.task("dev", ["less", "psci", "bundle", "concat"]);
gulp.task("default", ["less", "psci", "bundle", "concat", "docs"]);
gulp.task("prod", gulp.series("clean", "less", "psci", "bundle:cli", "bundle", "concat", "compress", "docs"));
gulp.task("dev", gulp.series("less", "psci", "bundle", "concat"));
gulp.task("default", gulp.series("less", "psci", "bundle", "concat", "docs"));
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"license": "MIT",
"homepage": "https://github.com/sharkdp/cube-composer",
"devDependencies": {
"gulp": "^3.9.1",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-less": "^3.3.0",
"gulp-less": "^3.5.0",
"gulp-purescript": "^2.0.0",
"gulp-uglify": "^2.1.2",
"rimraf": "^2.6.1"
"rimraf": "^2.7.1"
}
}

0 comments on commit 46176ea

Please sign in to comment.