File tree 5 files changed +73
-9
lines changed
5 files changed +73
-9
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version" : " 0.2.0" ,
6
+ "configurations" : [
7
+ {
8
+ "name" : " Electron Main Renderer" ,
9
+ "type" : " node" ,
10
+ "request" : " launch" ,
11
+ "protocol" : " inspector" ,
12
+ // Prelaunch task compiles main.ts for Electron & starts Angular dev server.
13
+ "preLaunchTask" : " Build.All" ,
14
+ "cwd" : " ${workspaceFolder}" ,
15
+ "runtimeExecutable" : " ${workspaceFolder}/node_modules/.bin/electron" ,
16
+ "runtimeArgs" : [
17
+ " --serve" ,
18
+ " ." ,
19
+ " --remote-debugging-port=9222"
20
+ ],
21
+ "windows" : {
22
+ "runtimeExecutable" : " ${workspaceFolder}/node_modules/.bin/electron.cmd"
23
+ }
24
+ }, {
25
+ "name" : " Karma Attach Chrome" ,
26
+ "type" : " chrome" ,
27
+ "request" : " attach" ,
28
+ "port" : 9222 ,
29
+ "webRoot" : " ${workspaceFolder}/" ,
30
+ "sourceMaps" : true ,
31
+ "timeout" : 30000 ,
32
+ "trace" : true
33
+ }
34
+
35
+ ]
36
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 2.0.0" ,
3
+ "tasks" : [
4
+ {
5
+ "label" : " Build.All" ,
6
+ "type" : " shell" ,
7
+ "command" : " npm run electron:serve-tsc && ng serve" ,
8
+ "isBackground" : true ,
9
+ "group" : {
10
+ "kind" : " build" ,
11
+ "isDefault" : true
12
+ },
13
+ "problemMatcher" : {
14
+ "owner" : " typescript" ,
15
+ "source" : " ts" ,
16
+ "applyTo" : " closedDocuments" ,
17
+ "fileLocation" : [" relative" , " ${cwd}" ],
18
+ "pattern" : " $tsc" ,
19
+ "background" : {
20
+ "activeOnStart" : true ,
21
+ "beginsPattern" : " ^.*" ,
22
+ "endsPattern" : " ^.*Compiled successfully.*"
23
+ }
24
+ }
25
+ }
26
+ ]
27
+ }
Original file line number Diff line number Diff line change @@ -24,10 +24,15 @@ function createWindow(): BrowserWindow {
24
24
} ) ;
25
25
26
26
if ( serve ) {
27
+
28
+ require ( 'devtron' ) . install ( ) ;
29
+ win . webContents . openDevTools ( ) ;
30
+
27
31
require ( 'electron-reload' ) ( __dirname , {
28
32
electron : require ( `${ __dirname } /node_modules/electron` )
29
33
} ) ;
30
34
win . loadURL ( 'http://localhost:4200' ) ;
35
+
31
36
} else {
32
37
win . loadURL ( url . format ( {
33
38
pathname : path . join ( __dirname , 'dist/index.html' ) ,
@@ -36,10 +41,6 @@ function createWindow(): BrowserWindow {
36
41
} ) ) ;
37
42
}
38
43
39
- if ( serve ) {
40
- win . webContents . openDevTools ( ) ;
41
- }
42
-
43
44
// Emitted when the window is closed.
44
45
win . on ( 'closed' , ( ) => {
45
46
// Dereference the window object, usually you would store window
Original file line number Diff line number Diff line change 33
33
"electron:linux" : " npm run build:prod && electron-builder build --linux" ,
34
34
"electron:windows" : " npm run build:prod && electron-builder build --windows" ,
35
35
"electron:mac" : " npm run build:prod && electron-builder build --mac" ,
36
- "test" : " ng test" ,
36
+ "test" : " ng test --watch=false" ,
37
+ "test:watch" : " ng test" ,
37
38
"e2e" : " npm run build:prod && cross-env TS_NODE_PROJECT='e2e/tsconfig.e2e.json' mocha --timeout 300000 --require ts-node/register e2e/**/*.e2e.ts" ,
38
39
"version" : " conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" ,
39
40
"lint" : " ng lint"
65
66
"conventional-changelog-cli" : " 2.0.32" ,
66
67
"core-js" : " 3.6.5" ,
67
68
"cross-env" : " 7.0.2" ,
69
+ "devtron" : " 1.4.0" ,
68
70
"electron" : " 8.2.3" ,
69
71
"electron-builder" : " 22.5.1" ,
70
72
"electron-reload" : " 1.5.0" ,
81
83
"npm-run-all" : " 4.1.5" ,
82
84
"rxjs" : " 6.5.5" ,
83
85
"spectron" : " 10.0.1" ,
84
- "tslib" : " 1.11.1" ,
85
86
"ts-node" : " 8.9.1" ,
87
+ "tslib" : " 1.11.1" ,
86
88
"typescript" : " 3.8.3" ,
87
89
"wait-on" : " 4.0.2" ,
88
90
"webdriver-manager" : " 12.1.7" ,
Original file line number Diff line number Diff line change @@ -24,9 +24,7 @@ module.exports = function (config) {
24
24
port : 9876 ,
25
25
colors : true ,
26
26
logLevel : config . LOG_INFO ,
27
- autoWatch : true ,
28
27
browsers : [ 'AngularElectron' ] ,
29
- singleRun : true ,
30
28
customLaunchers : {
31
29
AngularElectron : {
32
30
base : 'Electron' ,
@@ -43,4 +41,4 @@ module.exports = function (config) {
43
41
}
44
42
}
45
43
} ) ;
46
- } ;
44
+ } ;
You can’t perform that action at this time.
0 commit comments