Add test files for dev tsconfig.
This commit is contained in:
parent
fffc1153ca
commit
8f333b57ac
@ -11,13 +11,18 @@ const through = require('through2');
|
||||
const File = require('vinyl');
|
||||
|
||||
const paths = {
|
||||
ts: [
|
||||
"lib/**.{ts,tsx}",
|
||||
"background/*.{ts,tsx}",
|
||||
"content_scripts/*.{ts,tsx}",
|
||||
"popup/*.{ts,tsx}",
|
||||
"pages/*.{ts,tsx}",
|
||||
],
|
||||
ts: {
|
||||
release: [
|
||||
"lib/**.{ts,tsx}",
|
||||
"background/*.{ts,tsx}",
|
||||
"content_scripts/*.{ts,tsx}",
|
||||
"popup/*.{ts,tsx}",
|
||||
"pages/*.{ts,tsx}",
|
||||
],
|
||||
dev: [
|
||||
"test/tests/*.{ts,tsx}"
|
||||
],
|
||||
},
|
||||
dist: [
|
||||
"manifest.json",
|
||||
"img/*",
|
||||
@ -44,8 +49,6 @@ let manifest;
|
||||
manifest = JSON.parse(f);
|
||||
})();
|
||||
|
||||
console.log("version:", manifest.version);
|
||||
|
||||
|
||||
gulp.task("clean", function() {
|
||||
del("_build/ext");
|
||||
@ -53,17 +56,14 @@ gulp.task("clean", function() {
|
||||
|
||||
// Package the extension
|
||||
gulp.task("build-prod", ["clean"], function() {
|
||||
console.log("hello");
|
||||
const tsArgs = {};
|
||||
Object.assign(tsArgs, tsBaseArgs);
|
||||
console.log("args", JSON.stringify(tsArgs));
|
||||
tsArgs.typescript = require("typescript");
|
||||
// relative to the gulp.dest
|
||||
tsArgs.outDir = ".";
|
||||
// We don't want source maps for production
|
||||
tsArgs.sourceMap = undefined;
|
||||
gulp.src(paths.ts)
|
||||
.pipe(map((f,cb) => { console.log(f.path); cb(null, f); }))
|
||||
gulp.src(paths.ts.release)
|
||||
.pipe(ts(tsArgs))
|
||||
.pipe(gulp.dest("_build/ext/"));
|
||||
gulp.src(paths.dist, {base: ".", stripBOM: false})
|
||||
@ -72,7 +72,6 @@ gulp.task("build-prod", ["clean"], function() {
|
||||
|
||||
|
||||
gulp.task("package", ["build-prod"], function() {
|
||||
console.log("hello, packaging");
|
||||
let zipname = String.prototype.concat("taler-wallet-", manifest.version, ".zip");
|
||||
gulp.src("_build/ext/*", {buffer: false, stripBOM: false})
|
||||
.pipe(zip(zipname))
|
||||
@ -86,11 +85,9 @@ function tsconfig(confBase) {
|
||||
};
|
||||
Object.assign(conf.compilerOptions, confBase);
|
||||
return through.obj(function(file, enc, cb) {
|
||||
console.log("file", file.relative);
|
||||
conf.files.push(file.relative);
|
||||
cb();
|
||||
}, function(cb) {
|
||||
console.log("done");
|
||||
let x = JSON.stringify(conf, null, 2);
|
||||
let f = new File({
|
||||
path: "tsconfig.json",
|
||||
@ -105,7 +102,7 @@ function tsconfig(confBase) {
|
||||
// Generate the tsconfig file
|
||||
// that should be used during development.
|
||||
gulp.task("tsconfig", function() {
|
||||
gulp.src(paths.ts, {base: "."})
|
||||
gulp.src(Array.prototype.concat(paths.ts.release, paths.ts.dev), {base: "."})
|
||||
.pipe(tsconfig(tsBaseArgs))
|
||||
.pipe(gulp.dest("."));
|
||||
});
|
||||
|
@ -1,30 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"jsx": "react",
|
||||
"experimentalDecorators": true,
|
||||
"module": "system",
|
||||
"noLib": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"files": [
|
||||
"lib/refs.ts",
|
||||
"lib/wallet/wallet.ts",
|
||||
"lib/wallet/emscriptif.ts",
|
||||
"lib/wallet/db.ts",
|
||||
"lib/wallet/query.ts",
|
||||
"lib/wallet/http.ts",
|
||||
"lib/wallet/checkable.ts",
|
||||
"lib/wallet/wxmessaging.ts",
|
||||
"lib/wallet/types.ts",
|
||||
"lib/commonHelpers.ts",
|
||||
"lib/polyfill-react.ts",
|
||||
"content_scripts/notify.ts",
|
||||
"background/main.ts",
|
||||
"popup/balance-overview.tsx",
|
||||
"popup/history.tsx",
|
||||
"pages/confirm-contract.tsx",
|
||||
"pages/confirm-create-reserve.tsx",
|
||||
"test/tests/taler.ts"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"jsx": "react",
|
||||
"experimentalDecorators": true,
|
||||
"module": "system",
|
||||
"sourceMap": true,
|
||||
"noLib": true
|
||||
},
|
||||
"files": [
|
||||
"lib/commonHelpers.ts",
|
||||
"lib/polyfill-react.ts",
|
||||
"lib/refs.ts",
|
||||
"background/main.ts",
|
||||
"content_scripts/notify.ts",
|
||||
"popup/balance-overview.tsx",
|
||||
"popup/history.tsx",
|
||||
"pages/confirm-contract.tsx",
|
||||
"pages/confirm-create-reserve.tsx",
|
||||
"test/tests/taler.ts"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user