From 3ba02e3b6763b6cadb6ba2fe1e5ac10a08118439 Mon Sep 17 00:00:00 2001 From: Tomoyuki Aota Date: Sat, 26 Jan 2019 23:28:05 +0900 Subject: [PATCH 01/10] Add CI for macOS. --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index af3206b..6e0a959 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +os: + - linux + - osx language: node_js node_js: - 8 @@ -5,8 +8,7 @@ sudo: required addons: chrome: stable before_script: - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi install: - npm set progress=false - npm install From 2538965dca45bff58cc6093e5aad286e0798b329 Mon Sep 17 00:00:00 2001 From: Tomoyuki Aota Date: Sat, 26 Jan 2019 23:34:23 +0900 Subject: [PATCH 02/10] Run CI for Node.js version 10 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6e0a959..346884f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ os: - osx language: node_js node_js: + - 10 - 8 sudo: required addons: From 4db31e3796522e00a177e6391dd79cf7097c4987 Mon Sep 17 00:00:00 2001 From: Tomoyuki Aota Date: Wed, 8 May 2019 20:59:42 +0900 Subject: [PATCH 03/10] Use service xvfb. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9bfad5d..f3c019d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,12 @@ node_js: - '10' dist: xenial sudo: required +services: + - xvfb addons: chrome: stable before_script: - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi + - export DISPLAY=:99.0 install: - npm set progress=false - npm install From ccbf6cd92fd41c867a649adb4a4c1b176cb37a53 Mon Sep 17 00:00:00 2001 From: Tomoyuki Aota Date: Wed, 8 May 2019 21:21:48 +0900 Subject: [PATCH 04/10] Remove Node.js v12. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f3c019d..867db80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ os: - osx language: node_js node_js: - - '12' - '11' - '10' dist: xenial From 92334cf3a02456c027a45899d8e3e7263dc210e6 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 17:43:06 +0200 Subject: [PATCH 05/10] ref/ upgrade Angular 8 and Electron 5 --- README.md | 13 ++++++++----- browserslist | 12 ++++++++++++ package.json | 50 +++++++++++++++++++++++++------------------------ src/polyfills.ts | 57 ++++++++++++++++++++------------------------------------ tslint.json | 8 ++++---- 5 files changed, 70 insertions(+), 70 deletions(-) create mode 100644 browserslist diff --git a/README.md b/README.md index 529dd73..45a50ed 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Bootstrap and package your project with Angular 7 and Electron (Typescript + SAS Currently runs with: -- Angular v7.2.0 -- Electron v4.0.0 -- Electron Builder v20.28.1 +- Angular v8.0.0 +- Electron v5.0.2 +- Electron Builder v20.41.0 With this sample, you can : @@ -25,6 +25,8 @@ With this sample, you can : - Run your app in a production environment - Package your app into an executable file for Linux, Windows & Mac +/!\ Angular 8.0 CLI needs Node 10.9 or later to work. + ## Getting Started Clone this repository locally : @@ -80,14 +82,15 @@ You can do this! Just by importing your library in npm dependencies (not devDepe ## Browser mode Maybe you want to execute the application in the browser with hot reload ? You can do it with `npm run ng:serve:web`. -Note that you can't use Electron or NodeJS native libraries in this case. Please check `providers/electron.service.ts` to watch how conditional import of electron/Native libraries is done. +**Note that you can't use Electron or NodeJS native libraries in this case.** Please check `providers/electron.service.ts` to watch how conditional import of electron/Native libraries is done. ## Branch & Packages version - Angular 4 & Electron 1 : Branch [angular4](https://github.com/maximegris/angular-electron/tree/angular4) - Angular 5 & Electron 1 : Branch [angular5](https://github.com/maximegris/angular-electron/tree/angular5) - Angular 6 & Electron 3 : Branch [angular6](https://github.com/maximegris/angular-electron/tree/angular6) -- Angular 7 & Electron 3 : (master) +- Angular 7 & Electron 3 : Branch [angular7](https://github.com/maximegris/angular-electron/tree/angular7) +- Angular 8 & Electron 4 : (master) [build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master [build]: https://travis-ci.org/maximegris/angular-electron diff --git a/browserslist b/browserslist new file mode 100644 index 0000000..8084853 --- /dev/null +++ b/browserslist @@ -0,0 +1,12 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +> 0.5% +last 2 versions +Firefox ESR +not dead +not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file diff --git a/package.json b/package.json index 250522b..baf185e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-electron", - "version": "5.1.0", - "description": "Angular 7 with Electron (Typescript + SASS + Hot Reload)", + "version": "6.0.0", + "description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)", "homepage": "https://github.com/maximegris/angular-electron", "author": { "name": "Maxime GRIS", @@ -9,7 +9,7 @@ }, "keywords": [ "angular", - "angular 7", + "angular 8", "electron", "typescript", "sass" @@ -38,31 +38,30 @@ "version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" }, "devDependencies": { - "@angular-devkit/build-angular": "0.12.1", - "@angular/cli": "7.3.3", - "@angular/common": "7.2.7", - "@angular/compiler": "7.2.7", - "@angular/compiler-cli": "7.2.7", - "@angular/core": "7.2.7", - "@angular/forms": "7.2.7", - "@angular/http": "7.2.7", - "@angular/language-service": "7.2.7", - "@angular/platform-browser": "7.2.7", - "@angular/platform-browser-dynamic": "7.2.7", - "@angular/router": "7.2.7", + "@angular-devkit/build-angular": "~0.800.0", + "@angular/cli": "8.0.1", + "@angular/common": "8.0.0", + "@angular/compiler": "8.0.0", + "@angular/compiler-cli": "8.0.0", + "@angular/core": "8.0.0", + "@angular/forms": "8.0.0", + "@angular/language-service": "8.0.0", + "@angular/platform-browser": "8.0.0", + "@angular/platform-browser-dynamic": "8.0.0", + "@angular/router": "8.0.0", "@ngx-translate/core": "11.0.1", "@ngx-translate/http-loader": "4.0.0", "@types/jasmine": "2.8.7", "@types/jasminewd2": "2.0.3", - "@types/mocha": "^5.2.6", + "@types/mocha": "5.2.6", "@types/node": "8.9.4", - "chai": "^4.2.0", - "codelyzer": "4.5.0", + "chai": "4.2.0", + "codelyzer": "^5.0.1", "conventional-changelog-cli": "2.0.11", "core-js": "2.6.1", - "electron": "4.0.0", - "electron-builder": "20.36.2", - "electron-reload": "1.3.0", + "electron": "5.0.2", + "electron-builder": "20.41.0", + "electron-reload": "1.4.0", "jasmine-core": "3.3.0", "jasmine-spec-reporter": "4.2.1", "karma": "3.1.1", @@ -72,13 +71,16 @@ "karma-jasmine-html-reporter": "1.4.0", "mocha": "6.0.2", "npm-run-all": "4.1.5", - "rxjs": "6.4.0", + "rxjs": "6.5.2", "spectron": "5.0.0", "ts-node": "7.0.1", "tslint": "5.11.0", - "typescript": "3.2.4", + "typescript": "3.4.5", "wait-on": "3.2.0", "webdriver-manager": "12.1.0", - "zone.js": "0.8.29" + "zone.js": "~0.9.1" + }, + "engines" : { + "node" : ">=10.9.0" } } diff --git a/src/polyfills.ts b/src/polyfills.ts index ee8b84d..aa665d6 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -18,57 +18,40 @@ * BROWSER POLYFILLS */ -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - -/** - * If the application will be indexed by Google Search, the following is required. - * Googlebot uses a renderer based on Chrome 41. - * https://developers.google.com/search/docs/guides/rendering - **/ -// import 'core-js/es6/array'; - /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - /** * Web Animations `@angular/platform-browser/animations` * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - **/ + */ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags.ts'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * */ - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - - /* - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - */ -// (window as any).__Zone_enable_cross_context_check = true; - /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ diff --git a/tslint.json b/tslint.json index ae58080..12f4e93 100644 --- a/tslint.json +++ b/tslint.json @@ -123,12 +123,12 @@ "kebab-case" ], "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, + "no-inputs-metadata-property": true, + "no-outputs-metadata-property": true, + "no-host-metadata-property": true, "no-input-rename": true, "no-output-rename": true, - "use-life-cycle-interface": true, + "use-lifecycle-interface": true, "use-pipe-transform-interface": true, "component-class-suffix": true, "directive-class-suffix": true From fb719ab6f8d8fd47c5a8be0bfaa5ca89363d26cd Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 17:45:14 +0200 Subject: [PATCH 06/10] [Bumped Version] 6.0.0 --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc31a07..99712e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ +## 6.0.0 (2019-05-31) + +* bump angular version ([7a564a0](https://github.com/maximegris/angular-electron/commit/7a564a0)) +* Fix Travis CI link ([10aaa4c](https://github.com/maximegris/angular-electron/commit/10aaa4c)) +* Not gitignore src/karma.conf.js ([7599320](https://github.com/maximegris/angular-electron/commit/7599320)) +* ref/ upgrade Angular 8 and Electron 5 ([92334cf](https://github.com/maximegris/angular-electron/commit/92334cf)) +* update versions and prepare for electron 5 ([07a5786](https://github.com/maximegris/angular-electron/commit/07a5786)) +* version bump ([bb1d6bb](https://github.com/maximegris/angular-electron/commit/bb1d6bb)) +* feat(CI): update Ubuntu and Node versions in Travis ([e0ff557](https://github.com/maximegris/angular-electron/commit/e0ff557)) +* fix: type conflicts ([a2971bf](https://github.com/maximegris/angular-electron/commit/a2971bf)) +* fix(e2e): add mocha types ([20e1e89](https://github.com/maximegris/angular-electron/commit/20e1e89)) +* fix(e2e): without devTools ([2581983](https://github.com/maximegris/angular-electron/commit/2581983)), closes [/github.com/electron/spectron/issues/174#issuecomment-319242097](https://github.com//github.com/electron/spectron/issues/174/issues/issuecomment-319242097) +* chore: Spectron for e2e tests ([901438a](https://github.com/maximegris/angular-electron/commit/901438a)) + + + ## 5.1.0 (2018-11-30) +* [Bumped Version] 5.1.0 ([b790e12](https://github.com/maximegris/angular-electron/commit/b790e12)) * fix/ typo Angular 7 ([fde371f](https://github.com/maximegris/angular-electron/commit/fde371f)) * fix/ typo README ([723233c](https://github.com/maximegris/angular-electron/commit/723233c)) * fix/ typo script npm electron:windows ([45bab44](https://github.com/maximegris/angular-electron/commit/45bab44)) From 6ede0c8ae79f343730385444f9ed3718c3e6a1e9 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 17:59:16 +0200 Subject: [PATCH 07/10] ref/ strict version codelyzer --- CHANGELOG.md | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99712e3..958ca97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 6.0.0 (2019-05-31) +* [Bumped Version] 6.0.0 ([fb719ab](https://github.com/maximegris/angular-electron/commit/fb719ab)) * bump angular version ([7a564a0](https://github.com/maximegris/angular-electron/commit/7a564a0)) * Fix Travis CI link ([10aaa4c](https://github.com/maximegris/angular-electron/commit/10aaa4c)) * Not gitignore src/karma.conf.js ([7599320](https://github.com/maximegris/angular-electron/commit/7599320)) diff --git a/package.json b/package.json index baf185e..19480b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-electron", - "version": "6.0.0", + "version": "6.0.1", "description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)", "homepage": "https://github.com/maximegris/angular-electron", "author": { @@ -56,7 +56,7 @@ "@types/mocha": "5.2.6", "@types/node": "8.9.4", "chai": "4.2.0", - "codelyzer": "^5.0.1", + "codelyzer": "5.0.1", "conventional-changelog-cli": "2.0.11", "core-js": "2.6.1", "electron": "5.0.2", From 5a24b563b58a75c93cca96656290f8432723754b Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 18:00:44 +0200 Subject: [PATCH 08/10] ref/ strict version build-angular & zonejs --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 19480b8..12367d7 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.800.0", + "@angular-devkit/build-angular": "0.800.0", "@angular/cli": "8.0.1", "@angular/common": "8.0.0", "@angular/compiler": "8.0.0", @@ -69,7 +69,7 @@ "karma-coverage-istanbul-reporter": "2.0.4", "karma-jasmine": "2.0.1", "karma-jasmine-html-reporter": "1.4.0", - "mocha": "6.0.2", + "mocha": "6.1.2", "npm-run-all": "4.1.5", "rxjs": "6.5.2", "spectron": "5.0.0", @@ -78,7 +78,7 @@ "typescript": "3.4.5", "wait-on": "3.2.0", "webdriver-manager": "12.1.0", - "zone.js": "~0.9.1" + "zone.js": "0.9.1" }, "engines" : { "node" : ">=10.9.0" From 4f9cef3201dee49170c8852a4289d94fa998f7c8 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 18:02:39 +0200 Subject: [PATCH 09/10] [Bumped Version] 6.0.1 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 958ca97..23dfb14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,22 @@ +## 6.0.1 (2019-05-31) + +* ref/ strict version build-angular & zonejs ([5a24b56](https://github.com/maximegris/angular-electron/commit/5a24b56)) +* ref/ strict version codelyzer ([6ede0c8](https://github.com/maximegris/angular-electron/commit/6ede0c8)) + + + ## 6.0.0 (2019-05-31) * [Bumped Version] 6.0.0 ([fb719ab](https://github.com/maximegris/angular-electron/commit/fb719ab)) +* Add CI for macOS. ([3ba02e3](https://github.com/maximegris/angular-electron/commit/3ba02e3)) * bump angular version ([7a564a0](https://github.com/maximegris/angular-electron/commit/7a564a0)) * Fix Travis CI link ([10aaa4c](https://github.com/maximegris/angular-electron/commit/10aaa4c)) * Not gitignore src/karma.conf.js ([7599320](https://github.com/maximegris/angular-electron/commit/7599320)) * ref/ upgrade Angular 8 and Electron 5 ([92334cf](https://github.com/maximegris/angular-electron/commit/92334cf)) +* Remove Node.js v12. ([ccbf6cd](https://github.com/maximegris/angular-electron/commit/ccbf6cd)) +* Run CI for Node.js version 10 ([2538965](https://github.com/maximegris/angular-electron/commit/2538965)) * update versions and prepare for electron 5 ([07a5786](https://github.com/maximegris/angular-electron/commit/07a5786)) +* Use service xvfb. ([4db31e3](https://github.com/maximegris/angular-electron/commit/4db31e3)) * version bump ([bb1d6bb](https://github.com/maximegris/angular-electron/commit/bb1d6bb)) * feat(CI): update Ubuntu and Node versions in Travis ([e0ff557](https://github.com/maximegris/angular-electron/commit/e0ff557)) * fix: type conflicts ([a2971bf](https://github.com/maximegris/angular-electron/commit/a2971bf)) From acf0d4f657a8ed15a8ad7ee68b9f80afbe3f53f8 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 31 May 2019 20:51:08 +0200 Subject: [PATCH 10/10] fix/ Version Electron in README --- README.md | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 45a50ed..41b1e60 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ # Introduction -Bootstrap and package your project with Angular 7 and Electron (Typescript + SASS + Hot Reload) for creating Desktop applications. +Bootstrap and package your project with Angular 8 and Electron (Typescript + SASS + Hot Reload) for creating Desktop applications. Currently runs with: @@ -90,7 +90,7 @@ Maybe you want to execute the application in the browser with hot reload ? You c - Angular 5 & Electron 1 : Branch [angular5](https://github.com/maximegris/angular-electron/tree/angular5) - Angular 6 & Electron 3 : Branch [angular6](https://github.com/maximegris/angular-electron/tree/angular6) - Angular 7 & Electron 3 : Branch [angular7](https://github.com/maximegris/angular-electron/tree/angular7) -- Angular 8 & Electron 4 : (master) +- Angular 8 & Electron 5 : (master) [build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master [build]: https://travis-ci.org/maximegris/angular-electron diff --git a/package.json b/package.json index 12367d7..a0d0970 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "webdriver-manager": "12.1.0", "zone.js": "0.9.1" }, - "engines" : { - "node" : ">=10.9.0" + "engines": { + "node": ">=10.9.0" } }