From e7fac6ed1f415ef9c20439c9f0eac2bed0dc7766 Mon Sep 17 00:00:00 2001 From: Maxime GRIS Date: Fri, 25 May 2018 12:18:33 +0200 Subject: [PATCH] ref/ upgrade angular to 6.0.3 --- README.md | 22 +++++++++++++++------- package.json | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cbabbf9..e71585e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Bootstrap and package your project with Angular 6(+) and Electron (Typescript + Currently runs with: -- Angular v6.0.2 +- Angular v6.0.3 - Angular-CLI v6.0.3 - Electron v2.0.1 - Electron Builder v20.13.4 @@ -60,12 +60,6 @@ The application code is managed by `main.ts`. In this sample, the app runs with The Angular component contains an example of Electron and NodeJS native lib import. You can desactivate "Developer Tools" by commenting `win.webContents.openDevTools();` in `main.ts`. -## Manage your environment variables - -- Using local variables : `npm start` or `cross-env ENV=local npm start` -- Using development variables : `cross-env ENV=dev npm start` -- Using production variables : `cross-env ENV=prod npm start` - ## Included Commands |Command|Description| @@ -85,6 +79,20 @@ You can desactivate "Developer Tools" by commenting `win.webContents.openDevTool Maybe you want to execute the application in the browser (WITHOUT HOT RELOAD ACTUALLY...) ? You can do it with `npm run ng:serve`. 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. +## Error with nodejs third party packages + +However since Angular 6 does not provide an eject anymore, you can't configure your webpack config file to import node externals. + +An issue in [Angular repository](https://github.com/angular/angular-cli/issues/10681) is opened about this feature. + +Please have a look at [Stack Overflow Post workaround](https://stackoverflow.com/questions/50234196/after-updating-from-angular-5-to-6-i-keep-getting-the-error-cant-resolve-timer) or use branch [angular5](https://github.com/maximegris/angular-electron/tree/angular5) and continue to eject your configuration file. + +## 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 2 : (master) + [build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master [build]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master [dependencyci-badge]: https://dependencyci.com/github/maximegris/angular-electron/badge diff --git a/package.json b/package.json index 78f3ea0..83702da 100644 --- a/package.json +++ b/package.json @@ -37,16 +37,16 @@ "devDependencies": { "@angular-devkit/build-angular": "0.6.3", "@angular/cli": "6.0.3", - "@angular/common": "6.0.2", - "@angular/compiler": "6.0.2", - "@angular/compiler-cli": "6.0.2", - "@angular/core": "6.0.2", - "@angular/forms": "6.0.2", - "@angular/http": "6.0.2", - "@angular/language-service": "6.0.2", - "@angular/platform-browser": "6.0.2", - "@angular/platform-browser-dynamic": "6.0.2", - "@angular/router": "6.0.2", + "@angular/common": "6.0.3", + "@angular/compiler": "6.0.3", + "@angular/compiler-cli": "6.0.3", + "@angular/core": "6.0.3", + "@angular/forms": "6.0.3", + "@angular/http": "6.0.3", + "@angular/language-service": "6.0.3", + "@angular/platform-browser": "6.0.3", + "@angular/platform-browser-dynamic": "6.0.3", + "@angular/router": "6.0.3", "@ngx-translate/core": "10.0.1", "@ngx-translate/http-loader": "3.0.1", "@types/jasmine": "2.8.7",