require is not defined

fix security issue with http local server:
https://github.com/electron/electron/blob/master/docs/api/browser-window.md#class-browserwindow

beutify dev-web -> web
fix tslint.json v5 naming issue
This commit is contained in:
Yuri Cherepanov
2019-11-15 22:45:10 +02:00
parent c4b2cb6733
commit 632c454056
4 changed files with 7 additions and 6 deletions

View File

@@ -50,7 +50,7 @@
} }
] ]
}, },
"dev-web": { "web": {
"optimization": false, "optimization": false,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": true, "sourceMap": true,
@@ -95,8 +95,8 @@
"dev": { "dev": {
"browserTarget": "angular-electron:build:dev" "browserTarget": "angular-electron:build:dev"
}, },
"dev-web": { "web": {
"browserTarget": "angular-electron:build:dev-web" "browserTarget": "angular-electron:build:web"
}, },
"production": { "production": {
"browserTarget": "angular-electron:build:production" "browserTarget": "angular-electron:build:production"

View File

@@ -19,6 +19,7 @@ function createWindow() {
height: size.height, height: size.height,
webPreferences: { webPreferences: {
nodeIntegration: true, nodeIntegration: true,
allowRunningInsecureContent: (serve) ? true : false,
}, },
}); });

View File

@@ -24,7 +24,7 @@
"build:dev": "npm run build -- -c dev", "build:dev": "npm run build -- -c dev",
"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": "ng serve -c dev-web -o", "ng:serve:web": "ng serve -c web -o",
"electron:serve-tsc": "tsc -p tsconfig-serve.json", "electron:serve-tsc": "tsc -p tsconfig-serve.json",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve", "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 .",
@@ -59,7 +59,7 @@
"codelyzer": "5.1.0", "codelyzer": "5.1.0",
"conventional-changelog-cli": "2.0.25", "conventional-changelog-cli": "2.0.25",
"core-js": "3.1.4", "core-js": "3.1.4",
"electron": "7.0.0", "electron": "7.1.1",
"electron-builder": "21.2.0", "electron-builder": "21.2.0",
"electron-reload": "1.5.0", "electron-reload": "1.5.0",
"jasmine-core": "3.4.0", "jasmine-core": "3.4.0",

View File

@@ -80,7 +80,7 @@
} }
], ],
"unified-signatures": true, "unified-signatures": true,
"use-life-cycle-interface": true, "use-lifecycle-interface": true,
"use-lifecycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"variable-name": false, "variable-name": false,