diff --git a/main.ts b/main.ts index 1389621d1..68d810384 100644 --- a/main.ts +++ b/main.ts @@ -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 { diff --git a/package.json b/package.json index a5e881d23..aa50c7548 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tsconfig-serve.json b/tsconfig-serve.json new file mode 100644 index 000000000..8bda27fc7 --- /dev/null +++ b/tsconfig-serve.json @@ -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" + ] +} diff --git a/tsconfig.json b/tsconfig.json index c8009a032..dc9baa071 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,5 +17,12 @@ "es2015", "dom" ] - } + }, + "include": [ + "main.ts", + "src/**/*" + ], + "exclude": [ + "node_modules" + ] }