https://github.com/borisskert/ng-electron
Code which shows how to integrate an Angular-based app into Electron
https://github.com/borisskert/ng-electron
angular angular-cli autoupdater electron electron-builder macos windows
Last synced: 7 months ago
JSON representation
Code which shows how to integrate an Angular-based app into Electron
- Host: GitHub
- URL: https://github.com/borisskert/ng-electron
- Owner: borisskert
- License: apache-2.0
- Created: 2019-04-26T13:02:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:01:43.000Z (almost 3 years ago)
- Last Synced: 2024-05-29T19:03:54.837Z (over 1 year ago)
- Topics: angular, angular-cli, autoupdater, electron, electron-builder, macos, windows
- Language: TypeScript
- Homepage:
- Size: 3.05 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ng-electron [](https://travis-ci.com/borisskert/ng-electron)
This project shows how to integrate a standard [Angular](https://angular.io)-Application into [Electron](https://electronjs.org).

## Persistence
| Environment | Persistence layer |
|-------------|--------------------|
| Angular | Saves content value to browser's indexedDB `level-js-ng-electron` by key `example-data`
| Electron | Saves content value into a level-DB on filesystem in directory `${HOME}/Library/Application Support/ng-electron/ng-electron.db` (macos) respectively `%APPDATA%\ng-electron/ng-electron.db` (windows)## Build and run (default Angular way)
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.3.
### Development server
* Run `npm run start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
### Build
* Run `npm run build:web` to build the project. The build artifacts will be stored in the `dist/` directory.
* Run `npm run build:web:prod` for a production build.### Running unit tests
* Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.github.io).
* Run `npm run test:ci` to execute unit tests in a CI environment.## Build and run (Electron way)
This project uses [Electron](https://electronjs.org) version 4.0.0 to build a desktop app.
### Development server
* Run `electron:serve` to serve your app via Electron.
Notice that you have to serve your app via the Angular-way before that.### Build
* Run `build:electron` to build the project.
* Run `npm run build:electron:prod` for a production build.
* Run `npm run electron:windows` to build the windows app. The build artifacts will be stored in the `release/` directory.
* Run `npm run electron:mac` to build the windows app. Notice that you need a macos-based OS to run this step. The build artifacts will be stored in the `release/` directory.### Run
* Run `npm run electron:local` to run the Electron-based app locally.
## Further help
* 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).
* To get more help how to build and run the app via Electron go check out the [official Electron-Website](https://electronjs.org).