electron
typescript
angular
nodejs
windows
linux
desktop
web
multi-platform
A simple multi-platform Electron template made to work with Angular Ivy.
This is an Angular project that works inside an Electron "container".
All Angular-CLI commands still works here, but some scripts where changed.
ng e2e
will use protractor to run e2e tests, just like set by Angular CLI.ng test
will use karma + jasmine to run unit tests, just like set by Angular CLIng lint
will run ESLint instead of TSLint.start
script will start Angular and Electron concurrently - may break if Electron starts before Angular.start-web
will runng serve
like default Angular-CLIstart
script does.start-app
will run build Electron and start it from the built source.build
will build both Angular withng build --prod
and Electron withtsc --build electron
- the build order matters, switch this and Angular will erase Electron's build files and the software will not start.build-web
will only build Angular.build-app
will only build Electron.pack
will make distributed packages form all Operating Systems that supports Electron, including MacOS.pack-win
will make a 64bits package for Windows (.exe).pack-linux
will make a 64bits package for Linux.
Everything else works like a common Angular-CLI generated project
This project was generated with Angular CLI version 11.2.14, if you aren't familiar with Angular projects, consider access the previous link to learn more about it.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
Also check Electron Documentation if you don't know it yet.
This project uses NodeJs, so you need it to start.
- Create a new repository on GitHub using this as a template;
- Open your new repository and clone it or open at GitHub Codespaces;
- Open the folder on VS Code or a terminal and run
npm install
oryarn
to download and install the project dependencies; - Start coding!
Tip: You can generate components, modules, services and everything from Angular normally.
Warning! Do not remove
dist/package.json
.
- easy way:
- run
start-web
. - access
localhost:4200
inside any browser. - Edit your code and see the changes at the browser.
- run
- alternative way:
- Certify that
environment.production
is set tofalse
- Run
start-web
. - Open another terminal and run
start-app
. - Edit your code and see the changes inside our Electron window! - this way you can still see at the browser by accessing
localhost:4200
.
- Certify that
- add live reload capabilities to dev environment
- create a wiki
- improve documentation with code examples
Feel free to collab with this project and/or to use to male your applications. I would appreciate if you credit this project with the link to this repo, so other developers can find and use it. But don't feel forced to do anything.
If you have an suggestion, problem or just want to say thanks, leave an issue!