Make sure tsconfig be used.

This commit is contained in:
sunao
2018-07-12 22:47:14 +08:00
parent 63a41b8450
commit 961c8b14e3
4 changed files with 44 additions and 5 deletions

View File

@@ -2,6 +2,8 @@ import { app, BrowserWindow, screen } from 'electron';
import * as path from 'path';
import * as url from 'url';
import {interval} from 'rxjs';
let win, serve;
const args = process.argv.slice(1);
serve = args.some(val => val === '--serve');
@@ -40,6 +42,8 @@ function createWindow() {
// when you should delete the corresponding element.
win = null;
});
interval(1000).subscribe(val => console.log(`ES5 works fine : @${val}s`));
}
try {

View File

@@ -27,8 +27,9 @@
"build:prod": "npm run build -- -c production",
"ng:serve": "ng serve",
"ng:serve:web": "npm run postinstall:web && ng serve -o",
"electron:tsc": "tsc main.ts",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:tsc && electron . --serve",
"electron:tsc": "tsc",
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve",
"electron:local": "npm run build:prod && electron .",
"electron:linux": "npm run build:prod && npx electron-builder build --linux",
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
@@ -36,8 +37,7 @@
"test": "npm run postinstall:web && ng test",
"e2e": "npm run postinstall:web && ng e2e"
},
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"@angular-devkit/build-angular": "0.6.3",
"@angular/cli": "6.0.5",

28
tsconfig-serve.json Normal file
View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"es2016",
"es2015",
"dom"
]
},
"include": [
"main.ts",
"src/**/*",
"e2e/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}

View File

@@ -17,5 +17,12 @@
"es2015",
"dom"
]
}
},
"include": [
"main.ts",
"src/**/*"
],
"exclude": [
"node_modules"
]
}