You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: content/packages-and-modules/contributing-packages-to-the-registry/creating-a-package-json-file.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Your Name <email@example.com> (http://example.com)
43
43
{
44
44
"name": "my-awesome-package",
45
45
"version": "1.0.0",
46
-
"author": "Your Name <email@example.com>"
46
+
"author": "Your Name <email@example.com> (http://example.com)"
47
47
}
48
48
```
49
49
@@ -116,7 +116,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
116
116
117
117
{
118
118
"name": "my_package",
119
-
"description": "",
119
+
"description": "make your package easier to find on the npm website",
120
120
"version": "1.0.0",
121
121
"scripts": {
122
122
"test": "echo \"Error: no test specified\" && exit 1"
@@ -139,7 +139,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
139
139
140
140
-`name`: the current directory name
141
141
-`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 `""`
143
143
-`scripts`: by default creates an empty `test` script
144
144
-`keywords`: empty
145
145
-`author`: empty
@@ -149,7 +149,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
149
149
150
150
### Setting config options for the init command
151
151
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:
153
153
154
154
```
155
155
> npm set init-author-email "example-user@example.com"
0 commit comments