From 84f05197a052be1f5df9d641cf75d6c409a14331 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Mon, 13 Jul 2020 21:00:05 +0200 Subject: [PATCH] ref/ Upgrade to Angular 10.3 & Electron 9.1 --- README.md | 6 +++--- angular.json | 2 +- e2e/tsconfig.e2e.json | 2 +- package.json | 58 +++++++++++++++++++++++++------------------------- src/tsconfig.app.json | 2 +- src/tsconfig.spec.json | 2 +- tsconfig.base.json | 32 ++++++++++++++++++++++++++++ tsconfig.json | 45 +++++++++++++-------------------------- 8 files changed, 83 insertions(+), 66 deletions(-) create mode 100644 tsconfig.base.json diff --git a/README.md b/README.md index 2e511ea..82c21ab 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,12 @@ # Introduction -Bootstrap and package your project with Angular 9 and Electron 8 (Typescript + SASS + Hot Reload) for creating Desktop applications. +Bootstrap and package your project with Angular 10 and Electron 8 (Typescript + SASS + Hot Reload) for creating Desktop applications. Currently runs with: -- Angular v10.0.2 -- Electron v9.0.5 +- Angular v10.0.3 +- Electron v9.1.0 - Electron Builder v22.7.0 With this sample, you can : diff --git a/angular.json b/angular.json index c52b3ad..7f42c13 100644 --- a/angular.json +++ b/angular.json @@ -162,7 +162,7 @@ "schematics": { "@schematics/angular:component": { "prefix": "app", - "styleext": "scss" + "style": "scss" }, "@schematics/angular:directive": { "prefix": "app" diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json index 46e1c21..9597947 100644 --- a/e2e/tsconfig.e2e.json +++ b/e2e/tsconfig.e2e.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "../out-tsc/e2e", "module": "commonjs", diff --git a/package.json b/package.json index 571f8c6..3dee7fa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-electron", - "version": "7.2.1", - "description": "Angular 9 with Electron (Typescript + SASS + Hot Reload)", + "version": "8.0.0", + "description": "Angular 10 with Electron (Typescript + SASS + Hot Reload)", "homepage": "https://github.com/maximegris/angular-electron", "author": { "name": "Maxime GRIS", @@ -9,7 +9,7 @@ }, "keywords": [ "angular", - "angular 9", + "angular 10", "electron", "typescript", "eslint", @@ -38,40 +38,40 @@ "lint": "ng lint" }, "devDependencies": { - "@angular-builders/custom-webpack": "9.1.0", - "@angular-devkit/build-angular": "0.901.9", + "@angular-builders/custom-webpack": "9.2.0", + "@angular-devkit/build-angular": "0.1000.2", "@angular-eslint/builder": "0.0.1-alpha.32", "@angular-eslint/eslint-plugin": "0.0.1-alpha.32", "@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32", "@angular-eslint/template-parser": "0.0.1-alpha.32", - "@angular/cli": "9.1.9", - "@angular/common": "9.1.11", - "@angular/compiler": "9.1.11", - "@angular/compiler-cli": "9.1.11", - "@angular/core": "9.1.11", - "@angular/forms": "9.1.11", - "@angular/language-service": "9.1.11", - "@angular/platform-browser": "9.1.11", - "@angular/platform-browser-dynamic": "9.1.11", - "@angular/router": "9.1.11", - "@ngx-translate/core": "12.1.2", - "@ngx-translate/http-loader": "5.0.0", - "@types/jasmine": "3.5.10", + "@angular/cli": "10.0.2", + "@angular/common": "10.0.3", + "@angular/compiler": "10.0.3", + "@angular/compiler-cli": "10.0.3", + "@angular/core": "10.0.3", + "@angular/forms": "10.0.3", + "@angular/language-service": "10.0.3", + "@angular/platform-browser": "10.0.3", + "@angular/platform-browser-dynamic": "10.0.3", + "@angular/router": "10.0.3", + "@ngx-translate/core": "13.0.0", + "@ngx-translate/http-loader": "6.0.0", + "@types/jasmine": "3.5.11", "@types/jasminewd2": "2.0.8", "@types/mocha": "7.0.2", - "@types/node": "12.11.1", - "@typescript-eslint/eslint-plugin": "3.3.0", - "@typescript-eslint/eslint-plugin-tslint": "3.3.0", - "@typescript-eslint/parser": "3.3.0", + "@types/node": "12.12.6", + "@typescript-eslint/eslint-plugin": "3.6.0", + "@typescript-eslint/eslint-plugin-tslint": "3.6.0", + "@typescript-eslint/parser": "3.6.0", "chai": "4.2.0", "conventional-changelog-cli": "2.0.34", "core-js": "3.6.5", "cross-env": "7.0.2", - "electron": "9.0.4", + "electron": "9.1.0", "electron-builder": "22.7.0", "electron-reload": "1.5.0", - "eslint": "7.3.0", - "eslint-plugin-import": "2.21.2", + "eslint": "7.4.0", + "eslint-plugin-import": "2.22.0", "jasmine-core": "3.5.0", "jasmine-spec-reporter": "5.0.2", "karma": "5.1.0", @@ -79,13 +79,13 @@ "karma-electron": "6.3.0", "karma-jasmine": "3.3.1", "karma-jasmine-html-reporter": "1.5.4", - "mocha": "8.0.1", + "mocha": "7.2.0", "npm-run-all": "4.1.5", - "rxjs": "6.5.5", - "spectron": "11.0.0", + "rxjs": "6.6.0", + "spectron": "11.1.0", "ts-node": "8.10.2", "tslib": "2.0.0", - "typescript": "3.8.3", + "typescript": "3.9.6", "wait-on": "5.0.1", "webdriver-manager": "12.1.7", "zone.js": "0.10.3" diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index f795ede..b9f0019 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "../out-tsc/app", "module": "es2015", diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json index eb2aca6..1f73aaf 100644 --- a/src/tsconfig.spec.json +++ b/src/tsconfig.spec.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "../out-tsc/spec", "module": "commonjs", diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..f637363 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "module": "es2020", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "es2016", + "es2015", + "dom" + ] + }, + "files": [ + "src/main.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/tsconfig.json b/tsconfig.json index e39e9ec..26abde9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,32 +1,17 @@ +/* + This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience. + It is not intended to be used to perform a compilation. + + To learn more about this file see: https://angular.io/config/solution-tsconfig. +*/ { - "compileOnSave": false, - "compilerOptions": { - "module": "esnext", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2017", - "es2016", - "es2015", - "dom" - ] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ], - "exclude": [ - "node_modules" + "files": [], + "references": [ + { + "path": "./src/tsconfig.app.json" + }, + { + "path": "./src/tsconfig.spec.json" + } ] -} +} \ No newline at end of file