mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
update with a tree
This commit is contained in:
@@ -146,11 +146,24 @@ of the main process.
|
||||
|
||||
e.g.
|
||||
|
||||
```
|
||||
project/
|
||||
├── main
|
||||
│ ├── foo.js
|
||||
│ └── index.js
|
||||
├── package.json
|
||||
└── renderer
|
||||
└── index.js
|
||||
```
|
||||
|
||||
```js
|
||||
// main process: main/index.js
|
||||
const { app, ipcMain } = require('electron')
|
||||
const { app } = require('electron')
|
||||
app.on('ready', () => {
|
||||
//...
|
||||
|
||||
// ...
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user