This project shows how to integrate a standard Angular-Application into Electron.
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) |
This project was generated with Angular CLI version 7.3.3.
- Run
npm run start
for a dev server. Navigate tohttp://localhost:4200/
. The app will automatically reload if you change any of the source files.
- Run
npm run build:web
to build the project. The build artifacts will be stored in thedist/
directory. - Run
npm run build:web:prod
for a production build.
- Run
npm run test
to execute the unit tests via Karma. - Run
npm run test:ci
to execute unit tests in a CI environment.
This project uses Electron version 4.0.0 to build a desktop app.
- Run
electron:serve
to serve your app via Electron. Notice that you have to serve your app via the Angular-way before that.
- 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 therelease/
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 therelease/
directory.
- Run
npm run electron:local
to run the Electron-based app locally.
- To get more help on the Angular CLI use
ng help
or go check out the Angular CLI README. - To get more help how to build and run the app via Electron go check out the official Electron-Website.