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 e2ewill use protractor to run e2e tests, just like set by Angular CLI.ng testwill use karma + jasmine to run unit tests, just like set by Angular CLIng lintwill run ESLint instead of TSLint.startscript will start Angular and Electron concurrently - may break if Electron starts before Angular.start-webwill runng servelike default Angular-CLIstartscript does.start-appwill run build Electron and start it from the built source.buildwill build both Angular withng build --prodand 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-webwill only build Angular.build-appwill only build Electron.packwill make distributed packages form all Operating Systems that supports Electron, including MacOS.pack-winwill make a 64bits package for Windows (.exe).pack-linuxwill 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 installoryarnto 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:4200inside any browser. - Edit your code and see the changes at the browser.
- run
- alternative way:
- Certify that
environment.productionis 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!
