Make sure tsconfig be used.
This commit is contained in:
4
main.ts
4
main.ts
@@ -2,6 +2,8 @@ import { app, BrowserWindow, screen } from 'electron';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as url from 'url';
|
import * as url from 'url';
|
||||||
|
|
||||||
|
import {interval} from 'rxjs';
|
||||||
|
|
||||||
let win, serve;
|
let win, serve;
|
||||||
const args = process.argv.slice(1);
|
const args = process.argv.slice(1);
|
||||||
serve = args.some(val => val === '--serve');
|
serve = args.some(val => val === '--serve');
|
||||||
@@ -40,6 +42,8 @@ function createWindow() {
|
|||||||
// when you should delete the corresponding element.
|
// when you should delete the corresponding element.
|
||||||
win = null;
|
win = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interval(1000).subscribe(val => console.log(`ES5 works fine : @${val}s`));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -27,8 +27,9 @@
|
|||||||
"build:prod": "npm run build -- -c production",
|
"build:prod": "npm run build -- -c production",
|
||||||
"ng:serve": "ng serve",
|
"ng:serve": "ng serve",
|
||||||
"ng:serve:web": "npm run postinstall:web && ng serve -o",
|
"ng:serve:web": "npm run postinstall:web && ng serve -o",
|
||||||
"electron:tsc": "tsc main.ts",
|
"electron:tsc": "tsc",
|
||||||
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:tsc && electron . --serve",
|
"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:local": "npm run build:prod && electron .",
|
||||||
"electron:linux": "npm run build:prod && npx electron-builder build --linux",
|
"electron:linux": "npm run build:prod && npx electron-builder build --linux",
|
||||||
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
|
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
|
||||||
@@ -36,8 +37,7 @@
|
|||||||
"test": "npm run postinstall:web && ng test",
|
"test": "npm run postinstall:web && ng test",
|
||||||
"e2e": "npm run postinstall:web && ng e2e"
|
"e2e": "npm run postinstall:web && ng e2e"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "0.6.3",
|
"@angular-devkit/build-angular": "0.6.3",
|
||||||
"@angular/cli": "6.0.5",
|
"@angular/cli": "6.0.5",
|
||||||
|
|||||||
28
tsconfig-serve.json
Normal file
28
tsconfig-serve.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -17,5 +17,12 @@
|
|||||||
"es2015",
|
"es2015",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"include": [
|
||||||
|
"main.ts",
|
||||||
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user