Skip to content

Commit eda158e

Browse files
authored
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
1 parent baadf82 commit eda158e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/packages-and-modules/contributing-packages-to-the-registry/creating-a-package-json-file.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Your Name <email@example.com> (http://example.com)
4343
{
4444
"name": "my-awesome-package",
4545
"version": "1.0.0",
46-
"author": "Your Name <email@example.com>"
46+
"author": "Your Name <email@example.com> (http://example.com)"
4747
}
4848
```
4949

@@ -116,7 +116,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
116116
117117
{
118118
"name": "my_package",
119-
"description": "",
119+
"description": "make your package easier to find on the npm website",
120120
"version": "1.0.0",
121121
"scripts": {
122122
"test": "echo \"Error: no test specified\" && exit 1"
@@ -139,7 +139,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
139139

140140
- `name`: the current directory name
141141
- `version`: always `1.0.0`
142-
- `description`: info from the README, or an empty string `""`
142+
- `description`: info about the package, or an empty string `""`
143143
- `scripts`: by default creates an empty `test` script
144144
- `keywords`: empty
145145
- `author`: empty
@@ -149,7 +149,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
149149

150150
### Setting config options for the init command
151151

152-
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:
152+
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:
153153

154154
```
155155
> npm set init-author-email "example-user@example.com"

0 commit comments

Comments
 (0)