@@ -9,32 +9,6 @@ file. It must be actual JSON, not just a JavaScript object literal.
9
9
A lot of the behavior described in this document is affected by the config
10
10
settings described in ` npm-config(7) ` .
11
11
12
- ## DEFAULT VALUES
13
-
14
- npm will default some values based on package contents.
15
-
16
- * ` "scripts": {"start": "node server.js"} `
17
-
18
- If there is a ` server.js ` file in the root of your package, then npm
19
- will default the ` start ` command to ` node server.js ` .
20
-
21
- * ` "scripts":{"preinstall": "node-waf clean || true; node-waf configure build"} `
22
-
23
- If there is a ` wscript ` file in the root of your package, npm will
24
- default the ` preinstall ` command to compile using node-waf.
25
-
26
- * ` "scripts":{"preinstall": "node-gyp rebuild"} `
27
-
28
- If there is a ` binding.gyp ` file in the root of your package, npm will
29
- default the ` preinstall ` command to compile using node-gyp.
30
-
31
- * ` "contributors": [...] `
32
-
33
- If there is an ` AUTHORS ` file in the root of your package, npm will
34
- treat each line as a ` Name <email> (url) ` format, where email and url
35
- are optional. Lines which start with a ` # ` or are blank, will be
36
- ignored.
37
-
38
12
## name
39
13
40
14
The * most* important things in your package.json are the name and version fields.
@@ -122,16 +96,8 @@ You can check [the full list of SPDX license IDs](https://spdx.org/licenses/).
122
96
Ideally you should pick one that is
123
97
[ OSI] ( http://opensource.org/licenses/alphabetical ) approved.
124
98
125
- If you have more complex licensing terms, or you want to provide more detail
126
- in your package.json file, you can use the more verbose plural form, like this:
127
-
128
- "licenses" : [
129
- { "type" : "MyLicense"
130
- , "url" : "http://github.com/owner/project/path/to/license"
131
- }
132
- ]
133
-
134
- It's also a good idea to include a license file at the top level in your package.
99
+ It's also a good idea to include a LICENSE file at the top level in
100
+ your package.
135
101
136
102
## people fields: author, contributors
137
103
@@ -575,6 +541,27 @@ Any config values can be overridden, but of course only "tag" and
575
541
See ` npm-config(7) ` to see the list of config options that can be
576
542
overridden.
577
543
544
+ ## DEFAULT VALUES
545
+
546
+ npm will default some values based on package contents.
547
+
548
+ * ` "scripts": {"start": "node server.js"} `
549
+
550
+ If there is a ` server.js ` file in the root of your package, then npm
551
+ will default the ` start ` command to ` node server.js ` .
552
+
553
+ * ` "scripts":{"preinstall": "node-gyp rebuild"} `
554
+
555
+ If there is a ` binding.gyp ` file in the root of your package, npm will
556
+ default the ` preinstall ` command to compile using node-gyp.
557
+
558
+ * ` "contributors": [...] `
559
+
560
+ If there is an ` AUTHORS ` file in the root of your package, npm will
561
+ treat each line as a ` Name <email> (url) ` format, where email and url
562
+ are optional. Lines which start with a ` # ` or are blank, will be
563
+ ignored.
564
+
578
565
## SEE ALSO
579
566
580
567
* semver(7)
0 commit comments