docs: remove confusing notes on Node (#23929)
* docs: remove confusing notes on Node * Update docs/tutorial/first-app.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> Co-authored-by: Mark Lee <malept@users.noreply.github.com>
This commit is contained in:
parent
b1adbf7fd7
commit
90caa5eac9
1 changed files with 3 additions and 16 deletions
|
@ -44,23 +44,10 @@ run the main process. An example of your `package.json` might look like this:
|
||||||
```
|
```
|
||||||
|
|
||||||
__Note__: If the `main` field is not present in `package.json`, Electron will
|
__Note__: If the `main` field is not present in `package.json`, Electron will
|
||||||
attempt to load an `index.js` (as Node.js does). If this was actually
|
attempt to load an `index.js` (as Node.js does).
|
||||||
a simple Node application, you would add a `start` script that instructs `node`
|
|
||||||
to execute the current package:
|
|
||||||
|
|
||||||
```json
|
By default, `npm start` would run the main script with Node.js. in order to make
|
||||||
{
|
it run with Electron, you can add a `start` script:
|
||||||
"name": "your-app",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"main": "main.js",
|
|
||||||
"scripts": {
|
|
||||||
"start": "node ."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Turning this Node application into an Electron application is quite simple - we
|
|
||||||
merely replace the `node` runtime with the `electron` runtime.
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue