-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Update creating-a-package-json-file.mdx (#1290)
Induce minor readability changes: - Provide example for website in "author" parameter - Add description in package.json code example as advised in the documentation - Highlight & edit npm init command
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ Your Name <[email protected]> (http://example.com) | |
{ | ||
"name": "my-awesome-package", | ||
"version": "1.0.0", | ||
"author": "Your Name <[email protected]>" | ||
"author": "Your Name <[email protected]> (http://example.com)" | ||
} | ||
``` | ||
|
||
|
@@ -116,7 +116,7 @@ Wrote to /home/monatheoctocat/my_package/package.json: | |
{ | ||
"name": "my_package", | ||
"description": "", | ||
"description": "make your package easier to find on the npm website", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
|
@@ -139,7 +139,7 @@ Wrote to /home/monatheoctocat/my_package/package.json: | |
|
||
- `name`: the current directory name | ||
- `version`: always `1.0.0` | ||
- `description`: info from the README, or an empty string `""` | ||
- `description`: info about the package, or an empty string `""` | ||
- `scripts`: by default creates an empty `test` script | ||
- `keywords`: empty | ||
- `author`: empty | ||
|
@@ -149,7 +149,7 @@ Wrote to /home/monatheoctocat/my_package/package.json: | |
|
||
### Setting config options for the init command | ||
|
||
You can set default config options for the init command. For example, to set the default author email, author name, and license, on the command line, run the following commands: | ||
You can set default config options for the `npm init` command. For example, to set the default author email, author name, and license, on the command line, run the following commands: | ||
|
||
``` | ||
> npm set init-author-email "[email protected]" | ||
|