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:
parent
420eaaa294
commit
e250a2d804
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,7 @@ Your Electron application uses the `package.json` file as the main entry point (
|
||||||
{
|
{
|
||||||
"name": "my-electron-app",
|
"name": "my-electron-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
"author": "your name",
|
||||||
"description": "My Electron app",
|
"description": "My Electron app",
|
||||||
"main": "main.js"
|
"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: 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:
|
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
|
```json
|
||||||
{
|
{
|
||||||
"name": "my-electron-app",
|
"name": "my-electron-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
"author": "your name",
|
||||||
|
"description": "My Electron app",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron ."
|
"start": "electron ."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue