Skip to content

Commit 92334cf

Browse files
committed
ref/ upgrade Angular 8 and Electron 5
1 parent bef886b commit 92334cf

File tree

5 files changed

+70
-70
lines changed

5 files changed

+70
-70
lines changed

Diff for: README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ Bootstrap and package your project with Angular 7 and Electron (Typescript + SAS
1515

1616
Currently runs with:
1717

18-
- Angular v7.2.0
19-
- Electron v4.0.0
20-
- Electron Builder v20.28.1
18+
- Angular v8.0.0
19+
- Electron v5.0.2
20+
- Electron Builder v20.41.0
2121

2222
With this sample, you can :
2323

2424
- Run your app in a local development environment with Electron & Hot reload
2525
- Run your app in a production environment
2626
- Package your app into an executable file for Linux, Windows & Mac
2727

28+
/!\ Angular 8.0 CLI needs Node 10.9 or later to work.
29+
2830
## Getting Started
2931

3032
Clone this repository locally :
@@ -80,14 +82,15 @@ You can do this! Just by importing your library in npm dependencies (not devDepe
8082
## Browser mode
8183

8284
Maybe you want to execute the application in the browser with hot reload ? You can do it with `npm run ng:serve:web`.
83-
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.
85+
**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.
8486

8587
## Branch & Packages version
8688

8789
- Angular 4 & Electron 1 : Branch [angular4](https://github.com/maximegris/angular-electron/tree/angular4)
8890
- Angular 5 & Electron 1 : Branch [angular5](https://github.com/maximegris/angular-electron/tree/angular5)
8991
- Angular 6 & Electron 3 : Branch [angular6](https://github.com/maximegris/angular-electron/tree/angular6)
90-
- Angular 7 & Electron 3 : (master)
92+
- Angular 7 & Electron 3 : Branch [angular7](https://github.com/maximegris/angular-electron/tree/angular7)
93+
- Angular 8 & Electron 4 : (master)
9194

9295
[build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master
9396
[build]: https://travis-ci.org/maximegris/angular-electron

Diff for: browserslist

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

Diff for: package.json

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "angular-electron",
3-
"version": "5.1.0",
4-
"description": "Angular 7 with Electron (Typescript + SASS + Hot Reload)",
3+
"version": "6.0.0",
4+
"description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)",
55
"homepage": "https://github.com/maximegris/angular-electron",
66
"author": {
77
"name": "Maxime GRIS",
88
"email": "[email protected]"
99
},
1010
"keywords": [
1111
"angular",
12-
"angular 7",
12+
"angular 8",
1313
"electron",
1414
"typescript",
1515
"sass"
@@ -38,31 +38,30 @@
3838
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
3939
},
4040
"devDependencies": {
41-
"@angular-devkit/build-angular": "0.12.1",
42-
"@angular/cli": "7.3.3",
43-
"@angular/common": "7.2.7",
44-
"@angular/compiler": "7.2.7",
45-
"@angular/compiler-cli": "7.2.7",
46-
"@angular/core": "7.2.7",
47-
"@angular/forms": "7.2.7",
48-
"@angular/http": "7.2.7",
49-
"@angular/language-service": "7.2.7",
50-
"@angular/platform-browser": "7.2.7",
51-
"@angular/platform-browser-dynamic": "7.2.7",
52-
"@angular/router": "7.2.7",
41+
"@angular-devkit/build-angular": "~0.800.0",
42+
"@angular/cli": "8.0.1",
43+
"@angular/common": "8.0.0",
44+
"@angular/compiler": "8.0.0",
45+
"@angular/compiler-cli": "8.0.0",
46+
"@angular/core": "8.0.0",
47+
"@angular/forms": "8.0.0",
48+
"@angular/language-service": "8.0.0",
49+
"@angular/platform-browser": "8.0.0",
50+
"@angular/platform-browser-dynamic": "8.0.0",
51+
"@angular/router": "8.0.0",
5352
"@ngx-translate/core": "11.0.1",
5453
"@ngx-translate/http-loader": "4.0.0",
5554
"@types/jasmine": "2.8.7",
5655
"@types/jasminewd2": "2.0.3",
57-
"@types/mocha": "^5.2.6",
56+
"@types/mocha": "5.2.6",
5857
"@types/node": "8.9.4",
59-
"chai": "^4.2.0",
60-
"codelyzer": "4.5.0",
58+
"chai": "4.2.0",
59+
"codelyzer": "^5.0.1",
6160
"conventional-changelog-cli": "2.0.11",
6261
"core-js": "2.6.1",
63-
"electron": "4.0.0",
64-
"electron-builder": "20.36.2",
65-
"electron-reload": "1.3.0",
62+
"electron": "5.0.2",
63+
"electron-builder": "20.41.0",
64+
"electron-reload": "1.4.0",
6665
"jasmine-core": "3.3.0",
6766
"jasmine-spec-reporter": "4.2.1",
6867
"karma": "3.1.1",
@@ -72,13 +71,16 @@
7271
"karma-jasmine-html-reporter": "1.4.0",
7372
"mocha": "6.0.2",
7473
"npm-run-all": "4.1.5",
75-
"rxjs": "6.4.0",
74+
"rxjs": "6.5.2",
7675
"spectron": "5.0.0",
7776
"ts-node": "7.0.1",
7877
"tslint": "5.11.0",
79-
"typescript": "3.2.4",
78+
"typescript": "3.4.5",
8079
"wait-on": "3.2.0",
8180
"webdriver-manager": "12.1.0",
82-
"zone.js": "0.8.29"
81+
"zone.js": "~0.9.1"
82+
},
83+
"engines" : {
84+
"node" : ">=10.9.0"
8385
}
8486
}

Diff for: src/polyfills.ts

+20-37
Original file line numberDiff line numberDiff line change
@@ -18,57 +18,40 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22-
// import 'core-js/es6/symbol';
23-
// import 'core-js/es6/object';
24-
// import 'core-js/es6/function';
25-
// import 'core-js/es6/parse-int';
26-
// import 'core-js/es6/parse-float';
27-
// import 'core-js/es6/number';
28-
// import 'core-js/es6/math';
29-
// import 'core-js/es6/string';
30-
// import 'core-js/es6/date';
31-
// import 'core-js/es6/array';
32-
// import 'core-js/es6/regexp';
33-
// import 'core-js/es6/map';
34-
// import 'core-js/es6/weak-map';
35-
// import 'core-js/es6/set';
36-
37-
/**
38-
* If the application will be indexed by Google Search, the following is required.
39-
* Googlebot uses a renderer based on Chrome 41.
40-
* https://developers.google.com/search/docs/guides/rendering
41-
**/
42-
// import 'core-js/es6/array';
43-
4421
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
4522
// import 'classlist.js'; // Run `npm install --save classlist.js`.
4623

47-
/** IE10 and IE11 requires the following for the Reflect API. */
48-
// import 'core-js/es6/reflect';
49-
5024
/**
5125
* Web Animations `@angular/platform-browser/animations`
5226
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
5327
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
54-
**/
28+
*/
5529
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5630

5731
/**
5832
* By default, zone.js will patch all possible macroTask and DomEvents
5933
* user can disable parts of macroTask/DomEvents patch by setting following flags
34+
* because those flags need to be set before `zone.js` being loaded, and webpack
35+
* will put import in the top of bundle, so user need to create a separate file
36+
* in this directory (for example: zone-flags.ts), and put the following flags
37+
* into that file, and then add the following code before importing zone.js.
38+
* import './zone-flags.ts';
39+
*
40+
* The flags allowed in zone-flags.ts are listed here.
41+
*
42+
* The following flags will work for all browsers.
43+
*
44+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47+
*
48+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
50+
*
51+
* (window as any).__Zone_enable_cross_context_check = true;
52+
*
6053
*/
6154

62-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
63-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
64-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
65-
66-
/*
67-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
68-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
69-
*/
70-
// (window as any).__Zone_enable_cross_context_check = true;
71-
7255
/***************************************************************************************************
7356
* Zone JS is required by default for Angular itself.
7457
*/

Diff for: tslint.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@
123123
"kebab-case"
124124
],
125125
"no-output-on-prefix": true,
126-
"use-input-property-decorator": true,
127-
"use-output-property-decorator": true,
128-
"use-host-property-decorator": true,
126+
"no-inputs-metadata-property": true,
127+
"no-outputs-metadata-property": true,
128+
"no-host-metadata-property": true,
129129
"no-input-rename": true,
130130
"no-output-rename": true,
131-
"use-life-cycle-interface": true,
131+
"use-lifecycle-interface": true,
132132
"use-pipe-transform-interface": true,
133133
"component-class-suffix": true,
134134
"directive-class-suffix": true

0 commit comments

Comments
 (0)