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:
Cheng Zhao 2020-06-04 12:00:52 +09:00 committed by GitHub
parent b1adbf7fd7
commit 90caa5eac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
{ {