You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-5
Original file line number
Diff line number
Diff line change
@@ -44,25 +44,40 @@ npm install -g @angular/cli
44
44
45
45
## To build for development
46
46
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
49
49
50
50
Voila! You can use your Angular + Electron app in a local development environment with hot reload !
51
51
52
52
The application code is managed by `main.js`. In this sample, the app runs with a simple Electron window and "Developer Tools" is open.
53
53
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.
54
54
You can desactivate "Developer Tools" by commenting `win.webContents.openDevTools();` in `main.js`.
55
55
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.
57
60
58
-
* Using development variables (environments/index.ts) : `npm run electron:dev`
61
+
## To build for production
59
62
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`
61
65
62
66
Your built files are in the /dist folder.
63
67
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
+
64
78
## Included Commands
65
79
80
+
-`npm run start:web` - Execute the app in the brower
66
81
-`npm run electron:linux` - builds your application and creates an app consumable on linux systems.
67
82
-`npm run electron:windows` - On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems.
68
83
-`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