Skip to content

Commit

Permalink
Make sure tsconfig be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
eggachecat committed Jul 12, 2018
1 parent 63a41b8 commit 961c8b1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
4 changes: 4 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
"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",
"electron:mac": "npm run build:prod && npx electron-builder build --mac",
"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",
Expand Down
28 changes: 28 additions & 0 deletions tsconfig-serve.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
9 changes: 8 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@
"es2015",
"dom"
]
}
},
"include": [
"main.ts",
"src/**/*"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 961c8b1

Please sign in to comment.