diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-01-18 23:19:43 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-01-18 23:19:43 +0100 |
commit | d44fe923460fcc2ec0e9a0e743d18324db3c4972 (patch) | |
tree | c45368b87e76caeeb9afae7a718756a759b1e82c | |
parent | 0fa7e5dfee13ce39a8daa370ea656495b9ead6e6 (diff) | |
download | wallet-core-d44fe923460fcc2ec0e9a0e743d18324db3c4972.tar.xz |
style / comments
-rw-r--r-- | extension/gulpfile.js | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/extension/gulpfile.js b/extension/gulpfile.js index 6c56e4540..9b62216dd 100644 --- a/extension/gulpfile.js +++ b/extension/gulpfile.js @@ -1,6 +1,32 @@ +/* + This file is part of TALER + (C) 2015 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> + */ "use strict"; +/** + * Run with + * $ gulp <taskname> + * + * The important tasks are: + * - tsconfig: generate tsconfig.json file for + * development + * - package: create Chrome extension zip file in + * _build/. + */ + const gulp = require("gulp"); const map = require("map-stream"); const ts = require("gulp-typescript"); @@ -50,7 +76,7 @@ let manifest; })(); -gulp.task("clean", function() { +gulp.task("clean", function () { return del("_build/ext"); }); @@ -60,7 +86,7 @@ gulp.task("dist-prod", ["clean"], function () { .pipe(gulp.dest("_build/ext/")); }); -gulp.task("compile-prod", ["clean"], function() { +gulp.task("compile-prod", ["clean"], function () { const tsArgs = {}; Object.assign(tsArgs, tsBaseArgs); tsArgs.typescript = require("typescript"); @@ -74,13 +100,19 @@ gulp.task("compile-prod", ["clean"], function() { }); -gulp.task("package", ["compile-prod", "dist-prod"], function() { +gulp.task("package", ["compile-prod", "dist-prod"], function () { let zipname = String.prototype.concat("taler-wallet-", manifest.version, ".zip"); return gulp.src("_build/ext/**", {buffer: false, stripBOM: false}) .pipe(zip(zipname)) .pipe(gulp.dest("_build/")); }); + +/** + * Generate a tsconfig.json with the + * given compiler options that compiles + * all files piped into it. + */ function tsconfig(confBase) { let conf = { compilerOptions: {}, |