Skip to content

Commit 315a79b

Browse files
committed
ref/ Upgrade to Angular 7
1 parent 198da42 commit 315a79b

File tree

4 files changed

+42
-45
lines changed

4 files changed

+42
-45
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Bootstrap and package your project with Angular 6(+) and Electron (Typescript +
1515

1616
Currently runs with:
1717

18-
- Angular v6.1.2
19-
- Electron v2.0.7
18+
- Angular v7.0.3
19+
- Electron v3.0.2
2020
- Electron Builder v20.28.1
2121

2222
With this sample, you can :

package.json

+21-19
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "angular-electron",
3-
"version": "4.2.2",
4-
"description": "Angular 6 with Electron (Typescript + SASS + Hot Reload)",
3+
"version": "5.0.0",
4+
"description": "Angular 7 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 6",
12+
"angular 7",
1313
"electron",
1414
"typescript",
1515
"sass"
@@ -34,30 +34,32 @@
3434
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
3535
"electron:mac": "npm run build:prod && npx electron-builder build --mac",
3636
"test": "npm run postinstall:web && ng test",
37-
"e2e": "npm run postinstall:web && ng e2e"
37+
"e2e": "npm run postinstall:web && ng e2e",
38+
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
3839
},
3940
"dependencies": {},
4041
"devDependencies": {
41-
"@angular-devkit/build-angular": "0.6.3",
42-
"@angular/cli": "6.1.2",
43-
"@angular/common": "6.1.2",
44-
"@angular/compiler": "6.1.2",
45-
"@angular/compiler-cli": "6.1.2",
46-
"@angular/core": "6.1.2",
47-
"@angular/forms": "6.1.2",
48-
"@angular/http": "6.1.2",
49-
"@angular/language-service": "6.1.2",
50-
"@angular/platform-browser": "6.1.2",
51-
"@angular/platform-browser-dynamic": "6.1.2",
52-
"@angular/router": "6.1.2",
42+
"@angular-devkit/build-angular": "~0.10.0",
43+
"@angular/cli": "7.0.5",
44+
"@angular/common": "7.0.3",
45+
"@angular/compiler": "7.0.3",
46+
"@angular/compiler-cli": "7.0.3",
47+
"@angular/core": "7.0.3",
48+
"@angular/forms": "7.0.3",
49+
"@angular/http": "7.0.3",
50+
"@angular/language-service": "7.0.3",
51+
"@angular/platform-browser": "7.0.3",
52+
"@angular/platform-browser-dynamic": "7.0.3",
53+
"@angular/router": "7.0.3",
5354
"@ngx-translate/core": "10.0.1",
5455
"@ngx-translate/http-loader": "3.0.1",
5556
"@types/jasmine": "2.8.7",
5657
"@types/jasminewd2": "2.0.3",
5758
"@types/node": "8.9.4",
5859
"codelyzer": "4.2.1",
60+
"conventional-changelog-cli": "^2.0.11",
5961
"core-js": "2.5.6",
60-
"electron": "^3.0.2",
62+
"electron": "3.0.8",
6163
"electron-builder": "20.28.1",
6264
"electron-reload": "1.2.2",
6365
"jasmine-core": "3.1.0",
@@ -70,10 +72,10 @@
7072
"npm-run-all": "4.1.3",
7173
"npx": "10.2.0",
7274
"protractor": "5.3.2",
73-
"rxjs": "6.2.2",
75+
"rxjs": "6.3.3",
7476
"ts-node": "6.0.3",
7577
"tslint": "5.10.0",
76-
"typescript": "2.7.2",
78+
"typescript": "3.1.6",
7779
"wait-on": "2.1.0",
7880
"webdriver-manager": "12.0.6",
7981
"zone.js": "0.8.26"

src/app/app.module.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'zone.js/dist/zone-mix';
21
import 'reflect-metadata';
32
import '../polyfills';
43
import { BrowserModule } from '@angular/platform-browser';

src/polyfills.ts

+19-23
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
1212
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
1313
*
14-
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
14+
* Learn more in https://angular.io/guide/browser-support
1515
*/
1616

1717
/***************************************************************************************************
@@ -34,21 +34,23 @@
3434
// import 'core-js/es6/weak-map';
3535
// import 'core-js/es6/set';
3636

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+
3744
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
3845
// import 'classlist.js'; // Run `npm install --save classlist.js`.
3946

4047
/** IE10 and IE11 requires the following for the Reflect API. */
4148
// import 'core-js/es6/reflect';
4249

43-
44-
/** Evergreen browsers require these. **/
45-
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46-
import 'core-js/es7/reflect';
47-
48-
4950
/**
50-
* Required to support Web Animations `@angular/platform-browser/animations`.
51-
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
51+
* Web Animations `@angular/platform-browser/animations`
52+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
53+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
5254
**/
5355
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5456

@@ -57,27 +59,21 @@ import 'core-js/es7/reflect';
5759
* user can disable parts of macroTask/DomEvents patch by setting following flags
5860
*/
5961

60-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
61-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
62-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
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
6365

64-
/*
65-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
66-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
67-
*/
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+
*/
6870
// (window as any).__Zone_enable_cross_context_check = true;
6971

7072
/***************************************************************************************************
7173
* Zone JS is required by default for Angular itself.
7274
*/
73-
import 'zone.js/dist/zone-mix'; // Included with Angular CLI.
75+
import 'zone.js/dist/zone'; // Included with Angular CLI.
7476

75-
/**
76-
* You can load zone-patch-electron to allow electron native APIs
77-
* (Such as dialog/shortcut/menu/getFileIcon/shell/session/
78-
* desktopCapturer/onEvent) in ngZone
79-
*/
80-
// import 'zone.js/dist/zone-patch-electron'; // add zone-patch-electron to patch Electron native API
8177

8278
/***************************************************************************************************
8379
* APPLICATION IMPORTS

0 commit comments

Comments
 (0)