14
README.md
14
README.md
@@ -19,7 +19,7 @@ Currently runs with:
|
||||
- Electron v11.0.3
|
||||
- Electron Builder v22.9.1
|
||||
|
||||
With this sample, you can :
|
||||
With this sample, you can:
|
||||
|
||||
- Run your app in a local development environment with Electron & Hot reload
|
||||
- Run your app in a production environment
|
||||
@@ -31,13 +31,13 @@ With this sample, you can :
|
||||
|
||||
## Getting Started
|
||||
|
||||
Clone this repository locally :
|
||||
Clone this repository locally:
|
||||
|
||||
``` bash
|
||||
git clone https://github.com/maximegris/angular-electron.git
|
||||
```
|
||||
|
||||
Install dependencies with npm :
|
||||
Install dependencies with npm:
|
||||
|
||||
``` bash
|
||||
npm install
|
||||
@@ -57,7 +57,7 @@ npm install -g @angular/cli
|
||||
|
||||
- **in a terminal window** -> npm start
|
||||
|
||||
Voila! You can use your Angular + Electron app in a local development environment with hot reload !
|
||||
Voila! You can use your Angular + Electron app in a local development environment with hot reload!
|
||||
|
||||
The application code is managed by `main.ts`. In this sample, the app runs with a simple Angular App (http://localhost:4200) and an Electron window.
|
||||
The Angular component contains an example of Electron and NodeJS native lib import.
|
||||
@@ -65,11 +65,11 @@ You can disable "Developer Tools" by commenting `win.webContents.openDevTools();
|
||||
|
||||
## Use Electron / NodeJS / 3rd party libraries
|
||||
|
||||
As see in previous chapter, this sample project runs on both mode (web and electron). To make this happens, **you have to import your dependencies the right way**. Please check `providers/electron.service.ts` to watch how conditional import of libraries has to be done when using electron / NodeJS / 3rd party librairies in renderer context (ie. Angular).
|
||||
This sample project runs in both modes (web and electron). To make this work, **you have to import your dependencies the right way**. Please check `providers/electron.service.ts` to watch how conditional import of libraries has to be done when using electron / NodeJS / 3rd party libraries in renderer context (i.e. Angular).
|
||||
|
||||
## Browser mode
|
||||
|
||||
Maybe you only want to execute the application in the browser with hot reload ? Just run `npm run ng:serve:web`.
|
||||
Maybe you only want to execute the application in the browser with hot reload? Just run `npm run ng:serve:web`.
|
||||
|
||||
## Included Commands
|
||||
|
||||
@@ -85,7 +85,7 @@ Maybe you only want to execute the application in the browser with hot reload ?
|
||||
|
||||
## You want to use a specific lib (like rxjs) in electron main thread ?
|
||||
|
||||
YES! You can do it! Just by importing your library in npm dependencies section (not **devDependencies**) with `npm install --save`. It will be loaded by electron during build phase and added to your final package. Then use your library by importing it in `main.ts` file. Quite simple, isn't it ?
|
||||
YES! You can do it! Just by importing your library in npm dependencies section (not **devDependencies**) with `npm install --save`. It will be loaded by electron during build phase and added to your final package. Then use your library by importing it in `main.ts` file. Quite simple, isn't it?
|
||||
|
||||
## E2E Testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user