chore: rename atom things to electron things in our docs / scripts (#23100)
This commit is contained in:
parent
0e86163a3e
commit
b03bd8c45c
10 changed files with 47 additions and 82 deletions
27
docs/faq.md
27
docs/faq.md
|
@ -139,32 +139,7 @@ When using Electron's built-in module you might encounter an error like this:
|
|||
Uncaught TypeError: Cannot read property 'setZoomLevel' of undefined
|
||||
```
|
||||
|
||||
This is because you have the [npm `electron` module][electron-module] installed
|
||||
either locally or globally, which overrides Electron's built-in module.
|
||||
|
||||
To verify whether you are using the correct built-in module, you can print the
|
||||
path of the `electron` module:
|
||||
|
||||
```javascript
|
||||
console.log(require.resolve('electron'))
|
||||
```
|
||||
|
||||
and then check if it is in the following form:
|
||||
|
||||
```sh
|
||||
"/path/to/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/exports/electron.js"
|
||||
```
|
||||
|
||||
If it is something like `node_modules/electron/index.js`, then you have to
|
||||
either remove the npm `electron` module, or rename it.
|
||||
|
||||
```sh
|
||||
npm uninstall electron
|
||||
npm uninstall -g electron
|
||||
```
|
||||
|
||||
However if you are using the built-in module but still getting this error, it
|
||||
is very likely you are using the module in the wrong process. For example
|
||||
It is very likely you are using the module in the wrong process. For example
|
||||
`electron.app` can only be used in the main process, while `electron.webFrame`
|
||||
is only available in renderer processes.
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ before distributing it to users.
|
|||
### Windows
|
||||
|
||||
You can rename `electron.exe` to any name you like, and edit its icon and other
|
||||
information with tools like [rcedit](https://github.com/atom/rcedit).
|
||||
information with tools like [rcedit](https://github.com/electron/rcedit).
|
||||
|
||||
### macOS
|
||||
|
||||
|
|
|
@ -64,8 +64,7 @@ The output should look roughly like this:
|
|||
│ ├── [...]
|
||||
├── node.dll
|
||||
├── resources
|
||||
│ ├── app
|
||||
│ └── atom.asar
|
||||
│ └── app.asar
|
||||
├── v8_context_snapshot.bin
|
||||
├── squirrel.exe
|
||||
└── ui_resources_200_percent.pak
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue