484b53557924fee73533db8fa2cc764a1cff5460
[platform/upstream/nodejs.git] / deps / npm / man / man5 / npm-json.5
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "PACKAGE\.JSON" "5" "November 2013" "" ""
5 .
6 .SH "NAME"
7 \fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
8 .
9 .SH "DESCRIPTION"
10 This document is all you need to know about what\'s required in your package\.json
11 file\.  It must be actual JSON, not just a JavaScript object literal\.
12 .
13 .P
14 A lot of the behavior described in this document is affected by the config
15 npm help  settings described in \fBnpm\-config\fR\|\.
16 .
17 .SH "DEFAULT VALUES"
18 npm will default some values based on package contents\.
19 .
20 .IP "\(bu" 4
21 \fB"scripts": {"start": "node server\.js"}\fR
22 .
23 .IP
24 If there is a \fBserver\.js\fR file in the root of your package, then npm
25 will default the \fBstart\fR command to \fBnode server\.js\fR\|\.
26 .
27 .IP "\(bu" 4
28 \fB"scripts":{"preinstall": "node\-waf clean || true; node\-waf configure build"}\fR
29 .
30 .IP
31 If there is a \fBwscript\fR file in the root of your package, npm will
32 default the \fBpreinstall\fR command to compile using node\-waf\.
33 .
34 .IP "\(bu" 4
35 \fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR
36 .
37 .IP
38 If there is a \fBbinding\.gyp\fR file in the root of your package, npm will
39 default the \fBpreinstall\fR command to compile using node\-gyp\.
40 .
41 .IP "\(bu" 4
42 \fB"contributors": [\.\.\.]\fR
43 .
44 .IP
45 If there is an \fBAUTHORS\fR file in the root of your package, npm will
46 treat each line as a \fBName <email> (url)\fR format, where email and url
47 are optional\.  Lines which start with a \fB#\fR or are blank, will be
48 ignored\.
49 .
50 .IP "" 0
51 .
52 .SH "name"
53 The \fImost\fR important things in your package\.json are the name and version fields\.
54 Those are actually required, and your package won\'t install without
55 them\.  The name and version together form an identifier that is assumed
56 to be completely unique\.  Changes to the package should come along with
57 changes to the version\.
58 .
59 .P
60 The name is what your thing is called\.  Some tips:
61 .
62 .IP "\(bu" 4
63 Don\'t put "js" or "node" in the name\.  It\'s assumed that it\'s js, since you\'re
64 writing a package\.json file, and you can specify the engine using the "engines"
65 field\.  (See below\.)
66 .
67 .IP "\(bu" 4
68 The name ends up being part of a URL, an argument on the command line, and a
69 folder name\. Any name with non\-url\-safe characters will be rejected\.
70 Also, it can\'t start with a dot or an underscore\.
71 .
72 .IP "\(bu" 4
73 The name will probably be passed as an argument to require(), so it should
74 be something short, but also reasonably descriptive\.
75 .
76 .IP "\(bu" 4
77 You may want to check the npm registry to see if there\'s something by that name
78 already, before you get too attached to it\.  http://registry\.npmjs\.org/
79 .
80 .IP "" 0
81 .
82 .SH "version"
83 The \fImost\fR important things in your package\.json are the name and version fields\.
84 Those are actually required, and your package won\'t install without
85 them\.  The name and version together form an identifier that is assumed
86 to be completely unique\.  Changes to the package should come along with
87 changes to the version\.
88 .
89 .P
90 Version must be parseable by node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled
91 with npm as a dependency\.  (\fBnpm install semver\fR to use it yourself\.)
92 .
93 .P
94 npm help  More on version numbers and ranges at semver\.
95 .
96 .SH "description"
97 Put a description in it\.  It\'s a string\.  This helps people discover your
98 package, as it\'s listed in \fBnpm search\fR\|\.
99 .
100 .SH "keywords"
101 Put keywords in it\.  It\'s an array of strings\.  This helps people
102 discover your package as it\'s listed in \fBnpm search\fR\|\.
103 .
104 .SH "homepage"
105 The url to the project homepage\.
106 .
107 .P
108 \fBNOTE\fR: This is \fInot\fR the same as "url"\.  If you put a "url" field,
109 then the registry will think it\'s a redirection to your package that has
110 been published somewhere else, and spit at you\.
111 .
112 .P
113 Literally\.  Spit\.  I\'m so not kidding\.
114 .
115 .SH "bugs"
116 The url to your project\'s issue tracker and / or the email address to which
117 issues should be reported\. These are helpful for people who encounter issues
118 with your package\.
119 .
120 .P
121 It should look like this:
122 .
123 .IP "" 4
124 .
125 .nf
126 { "url" : "http://github\.com/owner/project/issues"
127 , "email" : "project@hostname\.com"
128 }
129 .
130 .fi
131 .
132 .IP "" 0
133 .
134 .P
135 You can specify either one or both values\. If you want to provide only a url,
136 you can specify the value for "bugs" as a simple string instead of an object\.
137 .
138 .P
139 If a url is provided, it will be used by the \fBnpm bugs\fR command\.
140 .
141 .SH "license"
142 You should specify a license for your package so that people know how they are
143 permitted to use it, and any restrictions you\'re placing on it\.
144 .
145 .P
146 The simplest way, assuming you\'re using a common license such as BSD or MIT, is
147 to just specify the name of the license you\'re using, like this:
148 .
149 .IP "" 4
150 .
151 .nf
152 { "license" : "BSD" }
153 .
154 .fi
155 .
156 .IP "" 0
157 .
158 .P
159 If you have more complex licensing terms, or you want to provide more detail
160 in your package\.json file, you can use the more verbose plural form, like this:
161 .
162 .IP "" 4
163 .
164 .nf
165 "licenses" : [
166   { "type" : "MyLicense"
167   , "url" : "http://github\.com/owner/project/path/to/license"
168   }
169 ]
170 .
171 .fi
172 .
173 .IP "" 0
174 .
175 .P
176 It\'s also a good idea to include a license file at the top level in your package\.
177 .
178 .SH "people fields: author, contributors"
179 The "author" is one person\.  "contributors" is an array of people\.  A "person"
180 is an object with a "name" field and optionally "url" and "email", like this:
181 .
182 .IP "" 4
183 .
184 .nf
185 { "name" : "Barney Rubble"
186 , "email" : "b@rubble\.com"
187 , "url" : "http://barnyrubble\.tumblr\.com/"
188 }
189 .
190 .fi
191 .
192 .IP "" 0
193 .
194 .P
195 Or you can shorten that all into a single string, and npm will parse it for you:
196 .
197 .IP "" 4
198 .
199 .nf
200 "Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/)
201 .
202 .fi
203 .
204 .IP "" 0
205 .
206 .P
207 Both email and url are optional either way\.
208 .
209 .P
210 npm also sets a top\-level "maintainers" field with your npm user info\.
211 .
212 .SH "files"
213 The "files" field is an array of files to include in your project\.  If
214 you name a folder in the array, then it will also include the files
215 inside that folder\. (Unless they would be ignored by another rule\.)
216 .
217 .P
218 You can also provide a "\.npmignore" file in the root of your package,
219 which will keep files from being included, even if they would be picked
220 up by the files array\.  The "\.npmignore" file works just like a
221 "\.gitignore"\.
222 .
223 .SH "main"
224 The main field is a module ID that is the primary entry point to your program\.
225 That is, if your package is named \fBfoo\fR, and a user installs it, and then does \fBrequire("foo")\fR, then your main module\'s exports object will be returned\.
226 .
227 .P
228 This should be a module ID relative to the root of your package folder\.
229 .
230 .P
231 For most modules, it makes the most sense to have a main script and often not
232 much else\.
233 .
234 .SH "bin"
235 A lot of packages have one or more executable files that they\'d like to
236 install into the PATH\. npm makes this pretty easy (in fact, it uses this
237 feature to install the "npm" executable\.)
238 .
239 .P
240 To use this, supply a \fBbin\fR field in your package\.json which is a map of
241 command name to local file name\. On install, npm will symlink that file into \fBprefix/bin\fR for global installs, or \fB\|\./node_modules/\.bin/\fR for local
242 installs\.
243 .
244 .P
245 For example, npm has this:
246 .
247 .IP "" 4
248 .
249 .nf
250 { "bin" : { "npm" : "\./cli\.js" } }
251 .
252 .fi
253 .
254 .IP "" 0
255 .
256 .P
257 So, when you install npm, it\'ll create a symlink from the \fBcli\.js\fR script to \fB/usr/local/bin/npm\fR\|\.
258 .
259 .P
260 If you have a single executable, and its name should be the name
261 of the package, then you can just supply it as a string\.  For example:
262 .
263 .IP "" 4
264 .
265 .nf
266 { "name": "my\-program"
267 , "version": "1\.2\.5"
268 , "bin": "\./path/to/program" }
269 .
270 .fi
271 .
272 .IP "" 0
273 .
274 .P
275 would be the same as this:
276 .
277 .IP "" 4
278 .
279 .nf
280 { "name": "my\-program"
281 , "version": "1\.2\.5"
282 , "bin" : { "my\-program" : "\./path/to/program" } }
283 .
284 .fi
285 .
286 .IP "" 0
287 .
288 .SH "man"
289 Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find\.
290 .
291 .P
292 If only a single file is provided, then it\'s installed such that it is the
293 result from \fBman <pkgname>\fR, regardless of its actual filename\.  For example:
294 .
295 .IP "" 4
296 .
297 .nf
298 { "name" : "foo"
299 , "version" : "1\.2\.3"
300 , "description" : "A packaged foo fooer for fooing foos"
301 , "main" : "foo\.js"
302 , "man" : "\./man/doc\.1"
303 }
304 .
305 .fi
306 .
307 .IP "" 0
308 .
309 .P
310 would link the \fB\|\./man/doc\.1\fR file in such that it is the target for \fBman foo\fR
311 .
312 .P
313 If the filename doesn\'t start with the package name, then it\'s prefixed\.
314 So, this:
315 .
316 .IP "" 4
317 .
318 .nf
319 { "name" : "foo"
320 , "version" : "1\.2\.3"
321 , "description" : "A packaged foo fooer for fooing foos"
322 , "main" : "foo\.js"
323 , "man" : [ "\./man/foo\.1", "\./man/bar\.1" ]
324 }
325 .
326 .fi
327 .
328 .IP "" 0
329 .
330 .P
331 will create files to do \fBman foo\fR and \fBman foo\-bar\fR\|\.
332 .
333 .P
334 Man files must end with a number, and optionally a \fB\|\.gz\fR suffix if they are
335 compressed\.  The number dictates which man section the file is installed into\.
336 .
337 .IP "" 4
338 .
339 .nf
340 { "name" : "foo"
341 , "version" : "1\.2\.3"
342 , "description" : "A packaged foo fooer for fooing foos"
343 , "main" : "foo\.js"
344 , "man" : [ "\./man/foo\.1", "\./man/foo\.2" ]
345 }
346 .
347 .fi
348 .
349 .IP "" 0
350 .
351 .P
352 will create entries for \fBman foo\fR and \fBman 2 foo\fR
353 .
354 .SH "directories"
355 The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a
356 few ways that you can indicate the structure of your package using a \fBdirectories\fR
357 hash\. If you look at npm\'s package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
358 you\'ll see that it has directories for doc, lib, and man\.
359 .
360 .P
361 In the future, this information may be used in other creative ways\.
362 .
363 .SS "directories\.lib"
364 Tell people where the bulk of your library is\.  Nothing special is done
365 with the lib folder in any way, but it\'s useful meta info\.
366 .
367 .SS "directories\.bin"
368 If you specify a "bin" directory, then all the files in that folder will
369 be used as the "bin" hash\.
370 .
371 .P
372 If you have a "bin" hash already, then this has no effect\.
373 .
374 .SS "directories\.man"
375 A folder that is full of man pages\.  Sugar to generate a "man" array by
376 walking the folder\.
377 .
378 .SS "directories\.doc"
379 Put markdown files in here\.  Eventually, these will be displayed nicely,
380 maybe, someday\.
381 .
382 .SS "directories\.example"
383 Put example scripts in here\.  Someday, it might be exposed in some clever way\.
384 .
385 .SH "repository"
386 Specify the place where your code lives\. This is helpful for people who
387 want to contribute\.  If the git repo is on github, then the \fBnpm docs\fR
388 command will be able to find you\.
389 .
390 .P
391 Do it like this:
392 .
393 .IP "" 4
394 .
395 .nf
396 "repository" :
397   { "type" : "git"
398   , "url" : "http://github\.com/isaacs/npm\.git"
399   }
400 "repository" :
401   { "type" : "svn"
402   , "url" : "http://v8\.googlecode\.com/svn/trunk/"
403   }
404 .
405 .fi
406 .
407 .IP "" 0
408 .
409 .P
410 The URL should be a publicly available (perhaps read\-only) url that can be handed
411 directly to a VCS program without any modification\.  It should not be a url to an
412 html project page that you put in your browser\.  It\'s for computers\.
413 .
414 .SH "scripts"
415 The "scripts" member is an object hash of script commands that are run
416 at various times in the lifecycle of your package\.  The key is the lifecycle
417 event, and the value is the command to run at that point\.
418 .
419 .P
420 npm help  See \fBnpm\-scripts\fR to find out more about writing package scripts\.
421 .
422 .SH "config"
423 A "config" hash can be used to set configuration
424 parameters used in package scripts that persist across upgrades\.  For
425 instance, if a package had the following:
426 .
427 .IP "" 4
428 .
429 .nf
430 { "name" : "foo"
431 , "config" : { "port" : "8080" } }
432 .
433 .fi
434 .
435 .IP "" 0
436 .
437 .P
438 and then had a "start" command that then referenced the \fBnpm_package_config_port\fR environment variable, then the user could
439 override that by doing \fBnpm config set foo:port 8001\fR\|\.
440 .
441 .P
442 npm help  See \fBnpm\-confignpm help  \fR and \fBnpm\-scripts\fR for more on package
443 configs\.
444 .
445 .SH "dependencies"
446 Dependencies are specified with a simple hash of package name to
447 version range\. The version range is a string which has one or more
448 space\-separated descriptors\.  Dependencies can also be identified with
449 a tarball or git URL\.
450 .
451 .P
452 \fBPlease do not put test harnesses or transpilers in your \fBdependencies\fR hash\.\fR  See \fBdevDependencies\fR, below\.
453 .
454 .P
455 npm help  See semver for more details about specifying version ranges\.
456 .
457 .IP "\(bu" 4
458 \fBversion\fR Must match \fBversion\fR exactly
459 .
460 .IP "\(bu" 4
461 \fB>version\fR Must be greater than \fBversion\fR
462 .
463 .IP "\(bu" 4
464 \fB>=version\fR etc
465 .
466 .IP "\(bu" 4
467 \fB<version\fR
468 .
469 .IP "\(bu" 4
470 \fB<=version\fR
471 .
472 .IP "\(bu" 4
473 npm help  \fB~version\fR "Approximately equivalent to version"  See semver
474 .
475 .IP "\(bu" 4
476 \fB1\.2\.x\fR 1\.2\.0, 1\.2\.1, etc\., but not 1\.3\.0
477 .
478 .IP "\(bu" 4
479 \fBhttp://\.\.\.\fR See \'URLs as Dependencies\' below
480 .
481 .IP "\(bu" 4
482 \fB*\fR Matches any version
483 .
484 .IP "\(bu" 4
485 \fB""\fR (just an empty string) Same as \fB*\fR
486 .
487 .IP "\(bu" 4
488 \fBversion1 \- version2\fR Same as \fB>=version1 <=version2\fR\|\.
489 .
490 .IP "\(bu" 4
491 \fBrange1 || range2\fR Passes if either range1 or range2 are satisfied\.
492 .
493 .IP "\(bu" 4
494 \fBgit\.\.\.\fR See \'Git URLs as Dependencies\' below
495 .
496 .IP "\(bu" 4
497 \fBuser/repo\fR See \'GitHub URLs\' below
498 .
499 .IP "" 0
500 .
501 .P
502 For example, these are all valid:
503 .
504 .IP "" 4
505 .
506 .nf
507 { "dependencies" :
508   { "foo" : "1\.0\.0 \- 2\.9999\.9999"
509   , "bar" : ">=1\.0\.2 <2\.1\.2"
510   , "baz" : ">1\.0\.2 <=2\.3\.4"
511   , "boo" : "2\.0\.1"
512   , "qux" : "<1\.0\.0 || >=2\.3\.1 <2\.4\.5 || >=2\.5\.2 <3\.0\.0"
513   , "asd" : "http://asdf\.com/asdf\.tar\.gz"
514   , "til" : "~1\.2"
515   , "elf" : "~1\.2\.3"
516   , "two" : "2\.x"
517   , "thr" : "3\.3\.x"
518   }
519 }
520 .
521 .fi
522 .
523 .IP "" 0
524 .
525 .SS "URLs as Dependencies"
526 You may specify a tarball URL in place of a version range\.
527 .
528 .P
529 This tarball will be downloaded and installed locally to your package at
530 install time\.
531 .
532 .SS "Git URLs as Dependencies"
533 Git urls can be of the form:
534 .
535 .IP "" 4
536 .
537 .nf
538 git://github\.com/user/project\.git#commit\-ish
539 git+ssh://user@hostname:project\.git#commit\-ish
540 git+ssh://user@hostname/project\.git#commit\-ish
541 git+http://user@hostname/project/blah\.git#commit\-ish
542 git+https://user@hostname/project/blah\.git#commit\-ish
543 .
544 .fi
545 .
546 .IP "" 0
547 .
548 .P
549 The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
550 an argument to \fBgit checkout\fR\|\.  The default is \fBmaster\fR\|\.
551 .
552 .SH "GitHub URLs"
553 As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-project"\. For example:
554 .
555 .P
556 \fBjson
557 {
558   "name": "foo",
559   "version": "0\.0\.0",
560   "dependencies": {
561     "express": "visionmedia/express"
562   }
563 }\fR
564 .
565 .SH "devDependencies"
566 If someone is planning on downloading and using your module in their
567 program, then they probably don\'t want or need to download and build
568 the external test or documentation framework that you use\.
569 .
570 .P
571 In this case, it\'s best to list these additional items in a \fBdevDependencies\fR hash\.
572 .
573 .P
574 These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR
575 from the root of a package, and can be managed like any other npm
576 npm help  configuration param\.  See \fBnpm\-config\fR for more on the topic\.
577 .
578 .P
579 For build steps that are not platform\-specific, such as compiling
580 CoffeeScript or other languages to JavaScript, use the \fBprepublish\fR
581 script to do this, and make the required package a devDependency\.
582 .
583 .P
584 For example:
585 .
586 .P
587 \fBjson
588 { "name": "ethopia\-waza",
589   "description": "a delightfully fruity coffee varietal",
590   "version": "1\.2\.3",
591   "devDependencies": {
592     "coffee\-script": "~1\.6\.3"
593   },
594   "scripts": {
595     "prepublish": "coffee \-o lib/ \-c src/waza\.coffee"
596   },
597   "main": "lib/waza\.js"
598 }\fR
599 .
600 .P
601 The \fBprepublish\fR script will be run before publishing, so that users
602 can consume the functionality without requiring them to compile it
603 themselves\.  In dev mode (ie, locally running \fBnpm install\fR), it\'ll
604 run this script as well, so that you can test it easily\.
605 .
606 .SH "bundledDependencies"
607 Array of package names that will be bundled when publishing the package\.
608 .
609 .P
610 If this is spelled \fB"bundleDependencies"\fR, then that is also honorable\.
611 .
612 .SH "optionalDependencies"
613 If a dependency can be used, but you would like npm to proceed if it
614 cannot be found or fails to install, then you may put it in the \fBoptionalDependencies\fR hash\.  This is a map of package name to version
615 or url, just like the \fBdependencies\fR hash\.  The difference is that
616 failure is tolerated\.
617 .
618 .P
619 It is still your program\'s responsibility to handle the lack of the
620 dependency\.  For example, something like this:
621 .
622 .IP "" 4
623 .
624 .nf
625 try {
626   var foo = require(\'foo\')
627   var fooVersion = require(\'foo/package\.json\')\.version
628 } catch (er) {
629   foo = null
630 }
631 if ( notGoodFooVersion(fooVersion) ) {
632   foo = null
633 }
634 // \.\. then later in your program \.\.
635 if (foo) {
636   foo\.doFooThings()
637 }
638 .
639 .fi
640 .
641 .IP "" 0
642 .
643 .P
644 Entries in \fBoptionalDependencies\fR will override entries of the same name in \fBdependencies\fR, so it\'s usually best to only put in one place\.
645 .
646 .SH "engines"
647 You can specify the version of node that your stuff works on:
648 .
649 .IP "" 4
650 .
651 .nf
652 { "engines" : { "node" : ">=0\.10\.3 <0\.12" } }
653 .
654 .fi
655 .
656 .IP "" 0
657 .
658 .P
659 And, like with dependencies, if you don\'t specify the version (or if you
660 specify "*" as the version), then any version of node will do\.
661 .
662 .P
663 If you specify an "engines" field, then npm will require that "node" be
664 somewhere on that list\. If "engines" is omitted, then npm will just assume
665 that it works on node\.
666 .
667 .P
668 You can also use the "engines" field to specify which versions of npm
669 are capable of properly installing your program\.  For example:
670 .
671 .IP "" 4
672 .
673 .nf
674 { "engines" : { "npm" : "~1\.0\.20" } }
675 .
676 .fi
677 .
678 .IP "" 0
679 .
680 .P
681 Note that, unless the user has set the \fBengine\-strict\fR config flag, this
682 field is advisory only\.
683 .
684 .SH "engineStrict"
685 If you are sure that your module will \fIdefinitely not\fR run properly on
686 versions of Node/npm other than those specified in the \fBengines\fR hash,
687 then you can set \fB"engineStrict": true\fR in your package\.json file\.
688 This will override the user\'s \fBengine\-strict\fR config setting\.
689 .
690 .P
691 Please do not do this unless you are really very very sure\.  If your
692 engines hash is something overly restrictive, you can quite easily and
693 inadvertently lock yourself into obscurity and prevent your users from
694 updating to new versions of Node\.  Consider this choice carefully\.  If
695 people abuse it, it will be removed in a future version of npm\.
696 .
697 .SH "os"
698 You can specify which operating systems your
699 module will run on:
700 .
701 .IP "" 4
702 .
703 .nf
704 "os" : [ "darwin", "linux" ]
705 .
706 .fi
707 .
708 .IP "" 0
709 .
710 .P
711 You can also blacklist instead of whitelist operating systems,
712 just prepend the blacklisted os with a \'!\':
713 .
714 .IP "" 4
715 .
716 .nf
717 "os" : [ "!win32" ]
718 .
719 .fi
720 .
721 .IP "" 0
722 .
723 .P
724 The host operating system is determined by \fBprocess\.platform\fR
725 .
726 .P
727 It is allowed to both blacklist, and whitelist, although there isn\'t any
728 good reason to do this\.
729 .
730 .SH "cpu"
731 If your code only runs on certain cpu architectures,
732 you can specify which ones\.
733 .
734 .IP "" 4
735 .
736 .nf
737 "cpu" : [ "x64", "ia32" ]
738 .
739 .fi
740 .
741 .IP "" 0
742 .
743 .P
744 Like the \fBos\fR option, you can also blacklist architectures:
745 .
746 .IP "" 4
747 .
748 .nf
749 "cpu" : [ "!arm", "!mips" ]
750 .
751 .fi
752 .
753 .IP "" 0
754 .
755 .P
756 The host architecture is determined by \fBprocess\.arch\fR
757 .
758 .SH "preferGlobal"
759 If your package is primarily a command\-line application that should be
760 installed globally, then set this value to \fBtrue\fR to provide a warning
761 if it is installed locally\.
762 .
763 .P
764 It doesn\'t actually prevent users from installing it locally, but it
765 does help prevent some confusion if it doesn\'t work as expected\.
766 .
767 .SH "private"
768 If you set \fB"private": true\fR in your package\.json, then npm will refuse
769 to publish it\.
770 .
771 .P
772 This is a way to prevent accidental publication of private repositories\.
773 If you would like to ensure that a given package is only ever published
774 to a specific registry (for example, an internal registry),
775 then use the \fBpublishConfig\fR hash described below
776 to override the \fBregistry\fR config param at publish\-time\.
777 .
778 .SH "publishConfig"
779 This is a set of config values that will be used at publish\-time\.  It\'s
780 especially handy if you want to set the tag or registry, so that you can
781 ensure that a given package is not tagged with "latest" or published to
782 the global public registry by default\.
783 .
784 .P
785 Any config values can be overridden, but of course only "tag" and
786 "registry" probably matter for the purposes of publishing\.
787 .
788 .P
789 npm help  See \fBnpm\-config\fR to see the list of config options that can be
790 overridden\.
791 .
792 .SH "SEE ALSO"
793 .
794 .IP "\(bu" 4
795 npm help  semver
796 .
797 .IP "\(bu" 4
798 npm help init
799 .
800 .IP "\(bu" 4
801 npm help version
802 .
803 .IP "\(bu" 4
804 npm help config
805 .
806 .IP "\(bu" 4
807 npm help  config
808 .
809 .IP "\(bu" 4
810 npm help help
811 .
812 .IP "\(bu" 4
813 npm help  faq
814 .
815 .IP "\(bu" 4
816 npm help install
817 .
818 .IP "\(bu" 4
819 npm help publish
820 .
821 .IP "\(bu" 4
822 npm help rm
823 .
824 .IP "" 0
825