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
Sarkis Kovlekjian committed
Sep 25, 2024 at 18:54 UTC
eda158e2f251b1b9cdba4db48029c90d9e668a9c
1 file changed
+4
-4
content/packages-and-modules/contributing-packages-to-the-registry/creating-a-package-json-file.mdx
+4
-4
@@ -43,7 +43,7 @@ Your Name <email@example.com> (http://example.com)
43
{
44
"name": "my-awesome-package",
45
"version": "1.0.0",
46
- "author": "Your Name <email@example.com>"
46
+ "author": "Your Name <email@example.com> (http://example.com)"
47
}
48
```
49
@@ -116,7 +116,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
116
117
{
118
"name": "my_package",
119
- "description": "",
119
+ "description": "make your package easier to find on the npm website",
120
"version": "1.0.0",
121
"scripts": {
122
"test": "echo \"Error: no test specified\" && exit 1"
@@ -139,7 +139,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
139
140
- `name`: the current directory name
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
- `scripts`: by default creates an empty `test` script
144
- `keywords`: empty
145
- `author`: empty
@@ -149,7 +149,7 @@ Wrote to /home/monatheoctocat/my_package/package.json:
149
150
### Setting config options for the init command
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
154
```
155
> npm set init-author-email "example-user@example.com"