Skip to content

Commit 01bbf13

Browse files
committed
Update readme with e2e info
1 parent e6c1b3b commit 01bbf13

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

Diff for: README.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,40 @@ npm install -g @angular/cli
4444

4545
## To build for development
4646

47-
**in a terminal window** -> npm start
48-
**in another terminal window** -> npm run electron:serve
47+
- **in a terminal window** -> npm start
48+
- **in another terminal window** -> npm run electron:serve
4949

5050
Voila! You can use your Angular + Electron app in a local development environment with hot reload !
5151

5252
The application code is managed by `main.js`. In this sample, the app runs with a simple Electron window and "Developer Tools" is open.
5353
The Angular component contains an example of Electron and NodeJS native lib import. See [Use NodeJS Native libraries](#use-nodejs-native-libraries) charpter if you want to import other native libraries in your project.
5454
You can desactivate "Developer Tools" by commenting `win.webContents.openDevTools();` in `main.js`.
5555

56-
## To build for production
56+
## Browser mode
57+
58+
Maybe you want to execute the application in the browser ? You can do it with `npm run start:web`.
59+
Note that you can't use Electron or NodeJS native libraries in this case. Please check `providers/electron.service.ts` to watch how conditional import of electron/Native libraries is done.
5760

58-
* Using development variables (environments/index.ts) : `npm run electron:dev`
61+
## To build for production
5962

60-
* Using production variables (environments/index.prod.ts) : `npm run electron:prod`
63+
- Using development variables (environments/index.ts) : `npm run electron:dev`
64+
- Using production variables (environments/index.prod.ts) : `npm run electron:prod`
6165

6266
Your built files are in the /dist folder.
6367

68+
## Execute E2E tests
69+
70+
You can find end-to-end tests in /e2e folder.
71+
72+
Before executing e2e scripts, you may need to update drivers libraries : `npm run pree2e`
73+
74+
You can now execute tests with the command lines below :
75+
- **in a terminal window** -> First, start a web server on port 4200 : `npm run start:web`
76+
- **in another terminal window** -> Then, execute Protractor : `npm run e2e`
77+
6478
## Included Commands
6579

80+
- `npm run start:web` - Execute the app in the brower
6681
- `npm run electron:linux` - builds your application and creates an app consumable on linux systems.
6782
- `npm run electron:windows` - On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems.
6883
- `npm run electron:mac` - On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac.

0 commit comments

Comments
 (0)