From cb94d871245aef2137a4ef0e55bd43ec893f1fef Mon Sep 17 00:00:00 2001 From: Jhonatan Date: Sat, 23 May 2020 20:40:49 -0300 Subject: [PATCH] docs(electron): update README.md --- LICENSE | 21 ++++++++++++++ README.md | 78 ++++++++++++++++++++++++++++++++++++++++++---------- package.json | 2 +- 3 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a861695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jhonatan Hardt de Medeiros + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 3588ab3..ef644e6 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,77 @@ -# WebviewAngularElectron +# WebView Angular Electron -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1. +## 🖥 Introduction -## Development server +WebView Angular Electron with Angular 9 and Electron 8 (Typescript + SASS + Hot Reload) for Desktop applications. -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. +Currently, runs with: -## Code scaffolding +Angular v9.1.4 +Electron v8.2.5 +Electron Builder v22.6.0 +With this sample, you can : -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. +Run your app in a local development environment with Electron & Hot reload +Run your app in a production environment +Package your app into an executable file for Linux, Windows & Mac +/!\ Hot reload only pertains to the renderer process. The main electron process is not able to be hot reloaded, only restarted. -## Build +/!\ Angular 9.x CLI needs Node 10.13 or later to works correctly. -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. +> The project use boilerplate from https://github.com/maximegris/angular-electron/ -## Running unit tests +## ⌨️ Development -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). +### Clone Code -## Running end-to-end tests +```bash +git clone git@github.com:JhonatanMedeiros/webview-angular-electron.git +``` -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +### Install Dependencies -## Further help +```bash +npm install +``` +> If you like [Yarn](https://yarnpkg.com/), you can also use `yarn` to install dependencies. -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). + +### Development + +```bash +npm run start +``` +> After run the command, the application open in new window. + +```bash +npm run run ng:serve:web +``` +> Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. + +### Build Release + +|Command|Description| +|--|--| +|`npm run build`| Build the app. | +|`npm run build:prod`| Build the app with Angular aot. | +|`npm run electron:local`| Builds your application and start electron +|`npm run electron:linux`| Builds your application and creates an app consumable on linux system | +|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems | +|`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac | + +After building, the application will be found in the `dist` directory. + +## 🛠 Technology Stack + +- [Angular 9x](https://angular.io/) +- [Electron](https://www.electronjs.org/) +- [Electron Builder](https://github.com/electron-userland/electron-builder) + + +# 🤝 Contribute [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) + +If you are interested in participating in joint development, PR and Forks are welcome! + +## 📜 License + +[MIT](https://github.com/JhonatanMedeiros/webview-angular-electron/blob/master/LICENSE) Copyright (c) 2020 - Jhonatan Hardt de Medeiros diff --git a/package.json b/package.json index 409a33c..486b65b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build:dev": "npm run build --", "build:prod": "npm run build -- --prod", "ng:serve": "ng serve", - "ng:serve:web": "ng serve -c web -o", + "ng:serve:web": "npm run ng:serve", "electron:serve-tsc": "tsc -p tsconfig-serve.json", "electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve", "electron:local": "npm run build:prod && electron .",