mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: include author and description in package.json in quick-start.md (#26983)
* Update quick-start.md `author` and `description` field is required * Update quick-start.md * Update quick-start.md Co-authored-by: Cheng Zhao <github@zcbenz.com>
This commit is contained in:
@@ -124,6 +124,7 @@ Your Electron application uses the `package.json` file as the main entry point (
|
||||
{
|
||||
"name": "my-electron-app",
|
||||
"version": "0.1.0",
|
||||
"author": "your name",
|
||||
"description": "My Electron app",
|
||||
"main": "main.js"
|
||||
}
|
||||
@@ -131,12 +132,16 @@ Your Electron application uses the `package.json` file as the main entry point (
|
||||
|
||||
> NOTE: If the `main` field is omitted, Electron will attempt to load an `index.js` file from the directory containing `package.json`.
|
||||
|
||||
> NOTE: The `author` and `description` fields are required for packaging, otherwise error will occur when running `npm run make`.
|
||||
|
||||
By default, the `npm start` command will run the main script with Node.js. To run the script with Electron, you need to change it as such:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-electron-app",
|
||||
"version": "0.1.0",
|
||||
"author": "your name",
|
||||
"description": "My Electron app",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"start": "electron ."
|
||||
|
||||
Reference in New Issue
Block a user