aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-17 15:58:36 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-17 15:58:36 +0200
commit8c0c4b5331d3cb467bb24c253fae3ca623ba5205 (patch)
tree755247f130c627a093e6e01894d103bceef18312 /gulpfile.js
parent6262af4ad73763e736bfb96a88c5d66e0ec51532 (diff)
automatic refresh
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 70d8b2254..14287bb71 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -58,6 +58,9 @@ const paths = {
"pages/*.{ts,tsx}",
"!**/*.d.ts",
],
+ decl: [
+ "lib/refs.d.ts",
+ ],
dev: [
"test/tests/*.{ts,tsx}",
],
@@ -73,10 +76,10 @@ const paths = {
"lib/module-trampoline.js",
"popup/**/*.{html,css}",
"pages/**/*.{html,css}",
- "lib/**/*.d.ts",
"background/*.html",
],
extra: [
+ "lib/**/*.d.ts",
"AUTHORS",
"README",
"COPYING",
@@ -220,7 +223,12 @@ gulp.task("compile-prod", ["clean"], function () {
tsArgs.outDir = ".";
// We don't want source maps for production
tsArgs.sourceMap = undefined;
- return gulp.src(paths.ts.release, {base: "."})
+ let opts = {base: "."};
+ const files = concatStreams(
+ gulp.src(paths.ts.release, opts),
+ gulp.src(paths.ts.decl, opts));
+
+ return files
.pipe(ts(tsArgs))
.pipe(gulp.dest("build/ext/"));
});
@@ -274,6 +282,7 @@ gulp.task("srcdist", [], function () {
// We can't just concat patterns due to exclude patterns
const files = concatStreams(
gulp.src(paths.ts.release, opts),
+ gulp.src(paths.ts.decl, opts),
gulp.src(paths.ts.dev, opts),
gulp.src(paths.dist, opts),
gulp.src(paths.extra, opts));
@@ -346,9 +355,13 @@ function tsconfig(confBase) {
// Generate the tsconfig file
// that should be used during development.
gulp.task("tsconfig", function() {
- return gulp.src(Array.prototype.concat(paths.ts.release, paths.ts.dev), {base: "."})
- .pipe(tsconfig(tsBaseArgs))
- .pipe(gulp.dest("."));
+ let opts = {base: "."};
+ const files = concatStreams(
+ gulp.src(paths.ts.release, opts),
+ gulp.src(paths.ts.dev, opts),
+ gulp.src(paths.ts.decl, opts));
+ return files.pipe(tsconfig(tsBaseArgs))
+ .pipe(gulp.dest("."));
});