diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-01-18 23:14:49 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-01-18 23:14:49 +0100 |
commit | 0fa7e5dfee13ce39a8daa370ea656495b9ead6e6 (patch) | |
tree | 4d0ea0cfc1e1da5293ee4b22e41943969c766b24 /extension/gulpfile.js | |
parent | 35d9279f78c60feffb7b08e369c0bae13fd8c239 (diff) |
Proper sequencing in the gulpfile
Diffstat (limited to 'extension/gulpfile.js')
-rw-r--r-- | extension/gulpfile.js | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/extension/gulpfile.js b/extension/gulpfile.js index 565e9fd6f..6c56e4540 100644 --- a/extension/gulpfile.js +++ b/extension/gulpfile.js @@ -51,11 +51,16 @@ let manifest; gulp.task("clean", function() { - del("_build/ext"); + return del("_build/ext"); }); -// Package the extension -gulp.task("build-prod", ["clean"], function() { + +gulp.task("dist-prod", ["clean"], function () { + return gulp.src(paths.dist, {base: ".", stripBOM: false}) + .pipe(gulp.dest("_build/ext/")); +}); + +gulp.task("compile-prod", ["clean"], function() { const tsArgs = {}; Object.assign(tsArgs, tsBaseArgs); tsArgs.typescript = require("typescript"); @@ -63,19 +68,17 @@ gulp.task("build-prod", ["clean"], function() { tsArgs.outDir = "."; // We don't want source maps for production tsArgs.sourceMap = undefined; - gulp.src(paths.ts.release) + return gulp.src(paths.ts.release) .pipe(ts(tsArgs)) .pipe(gulp.dest("_build/ext/")); - gulp.src(paths.dist, {base: ".", stripBOM: false}) - .pipe(gulp.dest("_build/ext/")); }); -gulp.task("package", ["build-prod"], function() { +gulp.task("package", ["compile-prod", "dist-prod"], function() { let zipname = String.prototype.concat("taler-wallet-", manifest.version, ".zip"); - gulp.src("_build/ext/*", {buffer: false, stripBOM: false}) - .pipe(zip(zipname)) - .pipe(gulp.dest("_build/")); + return gulp.src("_build/ext/**", {buffer: false, stripBOM: false}) + .pipe(zip(zipname)) + .pipe(gulp.dest("_build/")); }); function tsconfig(confBase) { @@ -102,8 +105,8 @@ function tsconfig(confBase) { // Generate the tsconfig file // that should be used during development. gulp.task("tsconfig", function() { - gulp.src(Array.prototype.concat(paths.ts.release, paths.ts.dev), {base: "."}) - .pipe(tsconfig(tsBaseArgs)) - .pipe(gulp.dest(".")); + return gulp.src(Array.prototype.concat(paths.ts.release, paths.ts.dev), {base: "."}) + .pipe(tsconfig(tsBaseArgs)) + .pipe(gulp.dest(".")); }); |