Browse Source

npm: Upgrade to 1.3.3

v0.10.14-release
isaacs 12 years ago
parent
commit
ff8a4058bf
  1. 142
      deps/npm/Makefile
  2. 0
      deps/npm/doc/api/npm-bin.md
  3. 0
      deps/npm/doc/api/npm-bugs.md
  4. 2
      deps/npm/doc/api/npm-commands.md
  5. 0
      deps/npm/doc/api/npm-config.md
  6. 2
      deps/npm/doc/api/npm-deprecate.md
  7. 0
      deps/npm/doc/api/npm-docs.md
  8. 0
      deps/npm/doc/api/npm-edit.md
  9. 0
      deps/npm/doc/api/npm-explore.md
  10. 0
      deps/npm/doc/api/npm-help-search.md
  11. 2
      deps/npm/doc/api/npm-init.md
  12. 0
      deps/npm/doc/api/npm-install.md
  13. 0
      deps/npm/doc/api/npm-link.md
  14. 0
      deps/npm/doc/api/npm-load.md
  15. 0
      deps/npm/doc/api/npm-ls.md
  16. 0
      deps/npm/doc/api/npm-outdated.md
  17. 2
      deps/npm/doc/api/npm-owner.md
  18. 0
      deps/npm/doc/api/npm-pack.md
  19. 0
      deps/npm/doc/api/npm-prefix.md
  20. 0
      deps/npm/doc/api/npm-prune.md
  21. 2
      deps/npm/doc/api/npm-publish.md
  22. 0
      deps/npm/doc/api/npm-rebuild.md
  23. 0
      deps/npm/doc/api/npm-restart.md
  24. 0
      deps/npm/doc/api/npm-root.md
  25. 2
      deps/npm/doc/api/npm-run-script.md
  26. 0
      deps/npm/doc/api/npm-search.md
  27. 0
      deps/npm/doc/api/npm-shrinkwrap.md
  28. 0
      deps/npm/doc/api/npm-start.md
  29. 0
      deps/npm/doc/api/npm-stop.md
  30. 0
      deps/npm/doc/api/npm-submodule.md
  31. 0
      deps/npm/doc/api/npm-tag.md
  32. 0
      deps/npm/doc/api/npm-test.md
  33. 0
      deps/npm/doc/api/npm-uninstall.md
  34. 0
      deps/npm/doc/api/npm-unpublish.md
  35. 0
      deps/npm/doc/api/npm-update.md
  36. 0
      deps/npm/doc/api/npm-version.md
  37. 0
      deps/npm/doc/api/npm-view.md
  38. 0
      deps/npm/doc/api/npm-whoami.md
  39. 6
      deps/npm/doc/api/npm.md
  40. 80
      deps/npm/doc/cli/changelog.md
  41. 209
      deps/npm/doc/cli/global.md
  42. 393
      deps/npm/doc/cli/index.md
  43. 4
      deps/npm/doc/cli/npm-adduser.md
  44. 4
      deps/npm/doc/cli/npm-bin.md
  45. 6
      deps/npm/doc/cli/npm-bugs.md
  46. 4
      deps/npm/doc/cli/npm-build.md
  47. 0
      deps/npm/doc/cli/npm-bundle.md
  48. 4
      deps/npm/doc/cli/npm-cache.md
  49. 4
      deps/npm/doc/cli/npm-completion.md
  50. 70
      deps/npm/doc/cli/npm-config.md
  51. 0
      deps/npm/doc/cli/npm-dedupe.md
  52. 2
      deps/npm/doc/cli/npm-deprecate.md
  53. 6
      deps/npm/doc/cli/npm-docs.md
  54. 6
      deps/npm/doc/cli/npm-edit.md
  55. 2
      deps/npm/doc/cli/npm-explore.md
  56. 2
      deps/npm/doc/cli/npm-help-search.md
  57. 10
      deps/npm/doc/cli/npm-help.md
  58. 2
      deps/npm/doc/cli/npm-init.md
  59. 20
      deps/npm/doc/cli/npm-install.md
  60. 10
      deps/npm/doc/cli/npm-link.md
  61. 4
      deps/npm/doc/cli/npm-ls.md
  62. 4
      deps/npm/doc/cli/npm-outdated.md
  63. 4
      deps/npm/doc/cli/npm-owner.md
  64. 2
      deps/npm/doc/cli/npm-pack.md
  65. 4
      deps/npm/doc/cli/npm-prefix.md
  66. 2
      deps/npm/doc/cli/npm-prune.md
  67. 2
      deps/npm/doc/cli/npm-publish.md
  68. 0
      deps/npm/doc/cli/npm-rebuild.md
  69. 2
      deps/npm/doc/cli/npm-restart.md
  70. 4
      deps/npm/doc/cli/npm-rm.md
  71. 4
      deps/npm/doc/cli/npm-root.md
  72. 2
      deps/npm/doc/cli/npm-run-script.md
  73. 4
      deps/npm/doc/cli/npm-search.md
  74. 2
      deps/npm/doc/cli/npm-shrinkwrap.md
  75. 0
      deps/npm/doc/cli/npm-star.md
  76. 0
      deps/npm/doc/cli/npm-stars.md
  77. 2
      deps/npm/doc/cli/npm-start.md
  78. 2
      deps/npm/doc/cli/npm-stop.md
  79. 2
      deps/npm/doc/cli/npm-submodule.md
  80. 4
      deps/npm/doc/cli/npm-tag.md
  81. 2
      deps/npm/doc/cli/npm-test.md
  82. 4
      deps/npm/doc/cli/npm-uninstall.md
  83. 2
      deps/npm/doc/cli/npm-unpublish.md
  84. 4
      deps/npm/doc/cli/npm-update.md
  85. 4
      deps/npm/doc/cli/npm-version.md
  86. 6
      deps/npm/doc/cli/npm-view.md
  87. 2
      deps/npm/doc/cli/npm-whoami.md
  88. 16
      deps/npm/doc/cli/npm.md
  89. 10
      deps/npm/doc/files/npm-folders.md
  90. 59
      deps/npm/doc/files/npmrc.md
  91. 19
      deps/npm/doc/files/package.json.md
  92. 8
      deps/npm/doc/misc/npm-coding-style.md
  93. 119
      deps/npm/doc/misc/npm-config.md
  94. 14
      deps/npm/doc/misc/npm-developers.md
  95. 4
      deps/npm/doc/misc/npm-disputes.md
  96. 21
      deps/npm/doc/misc/npm-faq.md
  97. 403
      deps/npm/doc/misc/npm-index.md
  98. 13
      deps/npm/doc/misc/npm-registry.md
  99. 118
      deps/npm/doc/misc/npm-scripts.md
  100. 0
      deps/npm/doc/misc/removing-npm.md

142
deps/npm/Makefile

@ -1,31 +1,57 @@
# vim: set softtabstop=2 shiftwidth=2:
SHELL = bash
markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
html_docdeps = html/dochead.html \
html/docfoot.html \
html/docfoot-script.html \
scripts/doc-build.sh \
package.json
cli_mandocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|doc/cli/|man/man1/|g' ) \
man/man1/README.1 \
man/man1/index.1
man/man1/npm-README.1
api_mandocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.3|g' \
|sed 's|doc/api/|man/man3/|g' )
files_mandocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.5|g' \
|sed 's|doc/files/|man/man5/|g' ) \
man/man5/npm-json.5 \
man/man5/npm-global.5
misc_mandocs = $(shell find doc/misc -name '*.md' \
|sed 's|.md|.7|g' \
|sed 's|doc/misc/|man/man7/|g' ) \
man/man7/index.7
cli_htmldocs = $(shell find doc/cli -name '*.md' \
|grep -v 'index.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/doc/|g' ) \
html/doc/README.html \
html/doc/index.html
|sed 's|doc/cli/|html/doc/cli/|g' ) \
html/doc/README.html
api_htmldocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/api/|html/api/|g' )
|sed 's|doc/api/|html/doc/api/|g' )
files_htmldocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/files/|html/doc/files/|g' ) \
html/doc/files/npm-json.html \
html/doc/files/npm-global.html
mandocs = $(api_mandocs) $(cli_mandocs)
misc_htmldocs = $(shell find doc/misc -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/misc/|html/doc/misc/|g' ) \
html/doc/index.html
htmldocs = $(api_htmldocs) $(cli_htmldocs)
mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)
all: doc
@ -58,17 +84,14 @@ doc-clean:
rm -rf \
node_modules/ronn \
node_modules/.bin/ronn \
.building_ronn \
doc/cli/index.md \
doc/api/index.md \
$(api_mandocs) \
$(cli_mandocs) \
$(api_htmldocs) \
$(cli_htmldocs) \
&>/dev/null || true
.building_ronn \
html/doc \
html/api \
man/man*
# use `npm install ronn` for this to work.
man/man1/README.1: README.md scripts/doc-build.sh package.json
man/man1/npm-README.1: README.md scripts/doc-build.sh package.json
@[ -d man/man1 ] || mkdir -p man/man1
scripts/doc-build.sh $< $@
man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json
@ -79,17 +102,54 @@ man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json
@[ -d man/man3 ] || mkdir -p man/man3
scripts/doc-build.sh $< $@
html/doc/README.html: README.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
man/man5/npm-json.5: man/man5/package.json.5
cp $< $@
man/man5/npm-global.5: man/man5/npm-folders.5
cp $< $@
man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json
@[ -d man/man5 ] || mkdir -p man/man5
scripts/doc-build.sh $< $@
html/doc/%.html: doc/cli/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
doc/misc/npm-index.md: scripts/index-build.js package.json
node scripts/index-build.js > $@
html/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
html/api/%.html: doc/api/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
@[ -d man/man7 ] || mkdir -p man/man7
scripts/doc-build.sh $< $@
doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh package.json
node scripts/index-build.js > $@
html/doc/README.html: README.md $(html_docdeps)
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
scripts/doc-build.sh $< $@
html/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -d html/doc/api ] || mkdir -p html/doc/api
scripts/doc-build.sh $< $@
html/doc/files/npm-json.html: html/doc/files/package.json.html
cp $< $@
html/doc/files/npm-global.html: html/doc/files/npm-folders.html
cp $< $@
html/doc/files/%.html: doc/files/%.md $(html_docdeps)
@[ -d html/doc/files ] || mkdir -p html/doc/files
scripts/doc-build.sh $< $@
html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
scripts/doc-build.sh $< $@
node_modules/.bin/ronn:
node cli.js install ronn
@ -114,18 +174,36 @@ publish: link doc
docpublish: doc-publish
doc-publish: doc
# legacy urls
for f in $$(find html/doc/{cli,files,misc}/ -name '*.html'); do \
j=$$(basename $$f | sed 's|^npm-||g'); \
if ! [ -f html/doc/$$j ] && [ $$j != README.html ] && [ $$j != index.html ]; then \
perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/doc/$$j; \
fi; \
done
mkdir -p html/api
for f in $$(find html/doc/api/ -name '*.html'); do \
j=$$(basename $$f | sed 's|^npm-||g'); \
perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/api/$$j; \
done
rsync -vazu --stats --no-implied-dirs --delete \
html/doc/ \
node@npmjs.org:/home/node/npm-www/doc
rsync -vazu --stats --no-implied-dirs --delete \
html/api/ \
node@npmjs.org:/home/node/npm-www/api
html/doc/* \
node@npmjs.org:/home/node/npm-www/doc
rsync -vazu --stats --no-implied-dirs --delete \
html/static/webfonts/ \
node@npmjs.org:/home/node/npm-www/static/webfonts
html/static/webfonts/ \
node@npmjs.org:/home/node/npm-www/static/webfonts
rsync -vazu --stats --no-implied-dirs --delete \
html/static/style.css \
node@npmjs.org:/home/node/npm-www/static/
html/static/style.css \
node@npmjs.org:/home/node/npm-www/static/
#cleanup
rm -rf html/api
for f in html/doc/*.html; do \
case $$f in \
html/doc/README.html) continue ;; \
html/doc/index.html) continue ;; \
*) rm $$f ;; \
esac; \
done
zip-publish: release
scp release/* node@nodejs.org:dist/npm/

0
deps/npm/doc/api/bin.md → deps/npm/doc/api/npm-bin.md

0
deps/npm/doc/api/bugs.md → deps/npm/doc/api/npm-bugs.md

2
deps/npm/doc/api/commands.md → deps/npm/doc/api/npm-commands.md

@ -19,4 +19,4 @@ usage, or `man 3 npm-<command>` for programmatic usage.
## SEE ALSO
* npm-index(1)
* npm-index(7)

0
deps/npm/doc/api/config.md → deps/npm/doc/api/npm-config.md

2
deps/npm/doc/api/deprecate.md → deps/npm/doc/api/npm-deprecate.md

@ -31,4 +31,4 @@ To un-deprecate a package, specify an empty string (`""`) for the `message` argu
* npm-publish(3)
* npm-unpublish(3)
* npm-registry(1)
* npm-registry(7)

0
deps/npm/doc/api/docs.md → deps/npm/doc/api/npm-docs.md

0
deps/npm/doc/api/edit.md → deps/npm/doc/api/npm-edit.md

0
deps/npm/doc/api/explore.md → deps/npm/doc/api/npm-explore.md

0
deps/npm/doc/api/help-search.md → deps/npm/doc/api/npm-help-search.md

2
deps/npm/doc/api/init.md → deps/npm/doc/api/npm-init.md

@ -26,4 +26,4 @@ then go ahead and use this programmatically.
## SEE ALSO
npm-json(1)
package.json(5)

0
deps/npm/doc/api/install.md → deps/npm/doc/api/npm-install.md

0
deps/npm/doc/api/link.md → deps/npm/doc/api/npm-link.md

0
deps/npm/doc/api/load.md → deps/npm/doc/api/npm-load.md

0
deps/npm/doc/api/ls.md → deps/npm/doc/api/npm-ls.md

0
deps/npm/doc/api/outdated.md → deps/npm/doc/api/npm-outdated.md

2
deps/npm/doc/api/owner.md → deps/npm/doc/api/npm-owner.md

@ -28,4 +28,4 @@ that is not implemented at this time.
## SEE ALSO
* npm-publish(3)
* npm-registry(1)
* npm-registry(7)

0
deps/npm/doc/api/pack.md → deps/npm/doc/api/npm-pack.md

0
deps/npm/doc/api/prefix.md → deps/npm/doc/api/npm-prefix.md

0
deps/npm/doc/api/prune.md → deps/npm/doc/api/npm-prune.md

2
deps/npm/doc/api/publish.md → deps/npm/doc/api/npm-publish.md

@ -25,6 +25,6 @@ the registry. Overwrites when the "force" environment variable is set.
## SEE ALSO
* npm-registry(1)
* npm-registry(7)
* npm-adduser(1)
* npm-owner(3)

0
deps/npm/doc/api/rebuild.md → deps/npm/doc/api/npm-rebuild.md

0
deps/npm/doc/api/restart.md → deps/npm/doc/api/npm-restart.md

0
deps/npm/doc/api/root.md → deps/npm/doc/api/npm-root.md

2
deps/npm/doc/api/run-script.md → deps/npm/doc/api/npm-run-script.md

@ -20,7 +20,7 @@ assumed to be the command to run. All other elements are ignored.
## SEE ALSO
* npm-scripts(1)
* npm-scripts(7)
* npm-test(3)
* npm-start(3)
* npm-restart(3)

0
deps/npm/doc/api/search.md → deps/npm/doc/api/npm-search.md

0
deps/npm/doc/api/shrinkwrap.md → deps/npm/doc/api/npm-shrinkwrap.md

0
deps/npm/doc/api/start.md → deps/npm/doc/api/npm-start.md

0
deps/npm/doc/api/stop.md → deps/npm/doc/api/npm-stop.md

0
deps/npm/doc/api/submodule.md → deps/npm/doc/api/npm-submodule.md

0
deps/npm/doc/api/tag.md → deps/npm/doc/api/npm-tag.md

0
deps/npm/doc/api/test.md → deps/npm/doc/api/npm-test.md

0
deps/npm/doc/api/uninstall.md → deps/npm/doc/api/npm-uninstall.md

0
deps/npm/doc/api/unpublish.md → deps/npm/doc/api/npm-unpublish.md

0
deps/npm/doc/api/update.md → deps/npm/doc/api/npm-update.md

0
deps/npm/doc/api/version.md → deps/npm/doc/api/npm-version.md

0
deps/npm/doc/api/view.md → deps/npm/doc/api/npm-view.md

0
deps/npm/doc/api/whoami.md → deps/npm/doc/api/npm-whoami.md

6
deps/npm/doc/api/npm.md

@ -30,11 +30,11 @@ If you provide `configObject` as an object hash of top-level
configs, they override the values stored in the various config
locations. In the npm command line client, this set of configs
is parsed from the command line options. Additional configuration
params are loaded from two configuration files. See `npm-config(1)`
for more information.
params are loaded from two configuration files. See `npm-config(1)`,
`npm-config(7)`, and `npmrc(5)` for more information.
After that, each of the functions are accessible in the
commands object: `npm.commands.<cmd>`. See `npm-index(1)` for a list of
commands object: `npm.commands.<cmd>`. See `npm-index(7)` for a list of
all possible commands.
All commands on the command object take an **array** of positional argument

80
deps/npm/doc/cli/changelog.md

@ -1,80 +0,0 @@
npm-changelog(1) -- Changes
===========================
## HISTORY
### 1.1.3, 1.1.4
* Update request to support HTTPS-over-HTTP proxy tunneling
* Throw on undefined envs in config settings
* Update which to 1.0.5
* Fix windows UNC busyloop in findPrefix
* Bundle nested bundleDependencies properly
* Alias adduser to add-user
* Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)
* ignore logfd/outfd streams in makeEnv() (Rod Vagg)
* shrinkwrap: Behave properly with url-installed deps
* install: Support --save with url install targets
* Support installing naked tars or single-file modules from urls etc.
* init: Don't add engines section
* Don't run make clean on rebuild
* Added missing unicode replacement (atomizer)
### 1.1.2
Dave Pacheco (2):
add "npm shrinkwrap"
Martin Cooper (1):
Fix #1753 Make a copy of the cached objects we'll modify.
Tim Oxley (1):
correctly remove readme from default npm view command.
Tyler Green (1):
fix #2187 set terminal columns to Infinity if 0
isaacs (19):
update minimatch
update request
Experimental: single-file modules
Fix #2172 Don't remove global mans uninstalling local pkgs
Add --versions flag to show the version of node as well
Support --json flag for ls output
update request to 2.9.151
### 1.1
* Replace system tar dependency with a JS tar
* Continue to refine
### 1.0
* Greatly simplified folder structure
* Install locally (bundle by default)
* Drastic rearchitecture
### 0.3
* More correct permission/uid handling when running as root
* Require node 0.4.0
* Reduce featureset
* Packages without "main" modules don't export modules
* Remove support for invalid JSON (since node doesn't support it)
### 0.2
* First allegedly "stable" release
* Most functionality implemented
* Used shim files and `name@version` symlinks
* Feature explosion
* Kind of a mess
### 0.1
* push to beta, and announce
* Solaris and Cygwin support
### 0.0
* Lots of sketches and false starts; abandoned a few times
* Core functionality established
## SEE ALSO
* npm(1)
* npm-faq(1)

209
deps/npm/doc/cli/global.md

@ -1,209 +0,0 @@
npm-folders(1) -- Folder Structures Used by npm
===============================================
## DESCRIPTION
npm puts various things on your computer. That's its job.
This document will tell you what it puts where.
### tl;dr
* Local install (default): puts stuff in `./node_modules` of the current
package root.
* Global install (with `-g`): puts stuff in /usr/local or wherever node
is installed.
* Install it **locally** if you're going to `require()` it.
* Install it **globally** if you're going to run it on the command line.
* If you need both, then install it in both places, or use `npm link`.
### prefix Configuration
The `prefix` config defaults to the location where node is installed.
On most systems, this is `/usr/local`, and most of the time is the same
as node's `process.installPrefix`.
On windows, this is the exact location of the node.exe binary. On Unix
systems, it's one level up, since node is typically installed at
`{prefix}/bin/node` rather than `{prefix}/node.exe`.
When the `global` flag is set, npm installs things into this prefix.
When it is not set, it uses the root of the current package, or the
current working directory if not in a package already.
### Node Modules
Packages are dropped into the `node_modules` folder under the `prefix`.
When installing locally, this means that you can
`require("packagename")` to load its main module, or
`require("packagename/lib/path/to/sub/module")` to load other modules.
Global installs on Unix systems go to `{prefix}/lib/node_modules`.
Global installs on Windows go to `{prefix}/node_modules` (that is, no
`lib` folder.)
If you wish to `require()` a package, then install it locally.
### Executables
When in global mode, executables are linked into `{prefix}/bin` on Unix,
or directly into `{prefix}` on Windows.
When in local mode, executables are linked into
`./node_modules/.bin` so that they can be made available to scripts run
through npm. (For example, so that a test runner will be in the path
when you run `npm test`.)
### Man Pages
When in global mode, man pages are linked into `{prefix}/share/man`.
When in local mode, man pages are not installed.
Man pages are not installed on Windows systems.
### Cache
See `npm-cache(1)`. Cache files are stored in `~/.npm` on Posix, or
`~/npm-cache` on Windows.
This is controlled by the `cache` configuration param.
### Temp Files
Temporary files are stored by default in the folder specified by the
`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment
variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
Temp files are given a unique folder under this root for each run of the
program, and are deleted upon successful exit.
## More Information
When installing locally, npm first tries to find an appropriate
`prefix` folder. This is so that `npm install foo@1.2.3` will install
to the sensible root of your package, even if you happen to have `cd`ed
into some other folder.
Starting at the $PWD, npm will walk up the folder tree checking for a
folder that contains either a `package.json` file, or a `node_modules`
folder. If such a thing is found, then that is treated as the effective
"current directory" for the purpose of running npm commands. (This
behavior is inspired by and similar to git's .git-folder seeking
logic when running git commands in a working dir.)
If no package root is found, then the current folder is used.
When you run `npm install foo@1.2.3`, then the package is loaded into
the cache, and then unpacked into `./node_modules/foo`. Then, any of
foo's dependencies are similarly unpacked into
`./node_modules/foo/node_modules/...`.
Any bin files are symlinked to `./node_modules/.bin/`, so that they may
be found by npm scripts when necessary.
### Global Installation
If the `global` configuration is set to true, then npm will
install packages "globally".
For global installation, packages are installed roughly the same way,
but using the folders described above.
### Cycles, Conflicts, and Folder Parsimony
Cycles are handled using the property of node's module system that it
walks up the directories looking for `node_modules` folders. So, at every
stage, if a package is already installed in an ancestor `node_modules`
folder, then it is not installed at the current location.
Consider the case above, where `foo -> bar -> baz`. Imagine if, in
addition to that, baz depended on bar, so you'd have:
`foo -> bar -> baz -> bar -> baz ...`. However, since the folder
structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to
put another copy of bar into `.../baz/node_modules`, since when it calls
require("bar"), it will get the copy that is installed in
`foo/node_modules/bar`.
This shortcut is only used if the exact same
version would be installed in multiple nested `node_modules` folders. It
is still possible to have `a/node_modules/b/node_modules/a` if the two
"a" packages are different versions. However, without repeating the
exact same package multiple times, an infinite regress will always be
prevented.
Another optimization can be made by installing dependencies at the
highest level possible, below the localized "target" folder.
#### Example
Consider this dependency graph:
foo
+-- blerg@1.2.5
+-- bar@1.2.3
| +-- blerg@1.x (latest=1.3.7)
| +-- baz@2.x
| | `-- quux@3.x
| | `-- bar@1.2.3 (cycle)
| `-- asdf@*
`-- baz@1.2.3
`-- quux@3.x
`-- bar
In this case, we might expect a folder structure like this:
foo
+-- node_modules
+-- blerg (1.2.5) <---[A]
+-- bar (1.2.3) <---[B]
| +-- node_modules
| | `-- baz (2.0.2) <---[C]
| | `-- node_modules
| | `-- quux (3.2.0)
| `-- asdf (2.3.4)
`-- baz (1.2.3) <---[D]
`-- node_modules
`-- quux (3.2.0) <---[E]
Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are
installed in foo's `node_modules` folder.
Even though the latest copy of blerg is 1.3.7, foo has a specific
dependency on version 1.2.5. So, that gets installed at [A]. Since the
parent installation of blerg satisfie's bar's dependency on blerg@1.x,
it does not install another copy under [B].
Bar [B] also has dependencies on baz and asdf, so those are installed in
bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot
re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],
and must install its own copy [C].
Underneath bar, the `baz->quux->bar` dependency creates a cycle.
However, because `bar` is already in `quux`'s ancestry [B], it does not
unpack another copy of bar into that folder.
Underneath `foo->baz` [D], quux's [E] folder tree is empty, because its
dependency on bar is satisfied by the parent folder copy installed at [B].
For a graphical breakdown of what is installed where, use `npm ls`.
### Publishing
Upon publishing, npm will look in the `node_modules` folder. If any of
the items there are not in the `bundledDependencies` array, then they will
not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
cannot be found elsewhere. See `npm-json(1)` for more information.
## SEE ALSO
* npm-faq(1)
* npm-json(1)
* npm-install(1)
* npm-pack(1)
* npm-cache(1)
* npm-config(1)
* npm-publish(1)

393
deps/npm/doc/cli/index.md

@ -1,393 +0,0 @@
npm-index(1) -- Index of all npm documentation
==============================================
## npm-README(1)
node package manager
# Command Line Documentation
## npm-adduser(1)
Add a registry user account
## npm-bin(1)
Display npm bin folder
## npm-bugs(1)
Bugs for a package in a web browser maybe
## npm-build(1)
Build a package
## npm-bundle(1)
REMOVED
## npm-cache(1)
Manipulates packages cache
## npm-changelog(1)
Changes
## npm-coding-style(1)
npm's "funny" coding style
## npm-completion(1)
Tab Completion for npm
## npm-config(1)
Manage the npm configuration file
## npm-dedupe(1)
Reduce duplication
## npm-deprecate(1)
Deprecate a version of a package
## npm-developers(1)
Developer Guide
## npm-disputes(1)
Handling Module Name Disputes
## npm-docs(1)
Docs for a package in a web browser maybe
## npm-edit(1)
Edit an installed package
## npm-explore(1)
Browse an installed package
## npm-faq(1)
Frequently Asked Questions
## npm-folders(1)
Folder Structures Used by npm
## npm-global(1)
Folder Structures Used by npm
## npm-help-search(1)
Search npm help documentation
## npm-help(1)
Get help on npm
## npm-init(1)
Interactively create a package.json file
## npm-install(1)
Install a package
## npm-json(1)
Specifics of npm's package.json handling
## npm-link(1)
Symlink a package folder
## npm-ls(1)
List installed packages
## npm-npm(1)
node package manager
## npm-outdated(1)
Check for outdated packages
## npm-owner(1)
Manage package owners
## npm-pack(1)
Create a tarball from a package
## npm-prefix(1)
Display prefix
## npm-prune(1)
Remove extraneous packages
## npm-publish(1)
Publish a package
## npm-rebuild(1)
Rebuild a package
## npm-registry(1)
The JavaScript Package Registry
## npm-removing-npm(1)
Cleaning the Slate
## npm-restart(1)
Start a package
## npm-rm(1)
Remove a package
## npm-root(1)
Display npm root
## npm-run-script(1)
Run arbitrary package scripts
## npm-scripts(1)
How npm handles the "scripts" field
## npm-search(1)
Search for packages
## npm-semver(1)
The semantic versioner for npm
## npm-shrinkwrap(1)
Lock down dependency versions
## npm-star(1)
Mark your favorite packages
## npm-stars(1)
View packages marked as favorites
## npm-start(1)
Start a package
## npm-stop(1)
Stop a package
## npm-submodule(1)
Add a package as a git submodule
## npm-tag(1)
Tag a published version
## npm-test(1)
Test a package
## npm-uninstall(1)
Remove a package
## npm-unpublish(1)
Remove a package from the registry
## npm-update(1)
Update a package
## npm-version(1)
Bump a package version
## npm-view(1)
View registry info
## npm-whoami(1)
Display npm username
# API Documentation
## npm-bin(3)
Display npm bin folder
## npm-bugs(3)
Bugs for a package in a web browser maybe
## npm-commands(3)
npm commands
## npm-config(3)
Manage the npm configuration files
## npm-deprecate(3)
Deprecate a version of a package
## npm-docs(3)
Docs for a package in a web browser maybe
## npm-edit(3)
Edit an installed package
## npm-explore(3)
Browse an installed package
## npm-help-search(3)
Search the help pages
## npm-init(3)
Interactively create a package.json file
## npm-install(3)
install a package programmatically
## npm-link(3)
Symlink a package folder
## npm-load(3)
Load config settings
## npm-ls(3)
List installed packages
## npm-npm(3)
node package manager
## npm-outdated(3)
Check for outdated packages
## npm-owner(3)
Manage package owners
## npm-pack(3)
Create a tarball from a package
## npm-prefix(3)
Display prefix
## npm-prune(3)
Remove extraneous packages
## npm-publish(3)
Publish a package
## npm-rebuild(3)
Rebuild a package
## npm-restart(3)
Start a package
## npm-root(3)
Display npm root
## npm-run-script(3)
Run arbitrary package scripts
## npm-search(3)
Search for packages
## npm-shrinkwrap(3)
programmatically generate package shrinkwrap file
## npm-start(3)
Start a package
## npm-stop(3)
Stop a package
## npm-submodule(3)
Add a package as a git submodule
## npm-tag(3)
Tag a published version
## npm-test(3)
Test a package
## npm-uninstall(3)
uninstall a package programmatically
## npm-unpublish(3)
Remove a package from the registry
## npm-update(3)
Update a package
## npm-version(3)
Bump a package version
## npm-view(3)
View registry info
## npm-whoami(3)
Display npm username

4
deps/npm/doc/cli/adduser.md → deps/npm/doc/cli/npm-adduser.md

@ -30,7 +30,9 @@ The base URL of the npm package registry.
## SEE ALSO
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-owner(1)
* npm-whoami(1)

4
deps/npm/doc/cli/bin.md → deps/npm/doc/cli/npm-bin.md

@ -13,5 +13,7 @@ Print the folder where npm will install executables.
* npm-prefix(1)
* npm-root(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

6
deps/npm/doc/cli/bugs.md → deps/npm/doc/cli/npm-bugs.md

@ -33,6 +33,8 @@ The base URL of the npm package registry.
* npm-docs(1)
* npm-view(1)
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-json(1)
* npm-config(7)
* npmrc(5)
* package.json(5)

4
deps/npm/doc/cli/build.md → deps/npm/doc/cli/npm-build.md

@ -18,5 +18,5 @@ It should generally not be called directly.
* npm-install(1)
* npm-link(1)
* npm-scripts(1)
* npm-json(1)
* npm-scripts(7)
* package.json(5)

0
deps/npm/doc/cli/bundle.md → deps/npm/doc/cli/npm-bundle.md

4
deps/npm/doc/cli/cache.md → deps/npm/doc/cli/npm-cache.md

@ -63,8 +63,10 @@ The root cache folder.
## SEE ALSO
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-install(1)
* npm-publish(1)
* npm-pack(1)

4
deps/npm/doc/cli/completion.md → deps/npm/doc/cli/npm-completion.md

@ -24,6 +24,6 @@ completions based on the arguments.
## SEE ALSO
* npm-developers(1)
* npm-faq(1)
* npm-developers(7)
* npm-faq(7)
* npm(1)

70
deps/npm/doc/cli/npm-config.md

@ -0,0 +1,70 @@
npm-config(1) -- Manage the npm configuration files
===================================================
## SYNOPSIS
npm config set <key> <value> [--global]
npm config get <key>
npm config delete <key>
npm config list
npm config edit
npm get <key>
npm set <key> <value> [--global]
## DESCRIPTION
npm gets its config settings from the command line, environment
variables, `npmrc` files, and in some cases, the `package.json` file.
See npmrc(5) for more information about the npmrc files.
See `npm-config(7)` for a more thorough discussion of the mechanisms
involved.
The `npm config` command can be used to update and edit the contents
of the user and global npmrc files.
## Sub-commands
Config supports the following sub-commands:
### set
npm config set key value
Sets the config key to the value.
If value is omitted, then it sets it to "true".
### get
npm config get key
Echo the config value to stdout.
### list
npm config list
Show all the config settings.
### delete
npm config delete key
Deletes the key from all configuration files.
### edit
npm config edit
Opens the config file in an editor. Use the `--global` flag to edit the
global config.
## SEE ALSO
* npm-folders(5)
* npm-config(7)
* package.json(5)
* npmrc(5)
* npm(1)

0
deps/npm/doc/cli/dedupe.md → deps/npm/doc/cli/npm-dedupe.md

2
deps/npm/doc/cli/deprecate.md → deps/npm/doc/cli/npm-deprecate.md

@ -23,4 +23,4 @@ To un-deprecate a package, specify an empty string (`""`) for the `message` argu
## SEE ALSO
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)

6
deps/npm/doc/cli/docs.md → deps/npm/doc/cli/npm-docs.md

@ -33,6 +33,8 @@ The base URL of the npm package registry.
* npm-view(1)
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-json(1)
* npm-config(7)
* npmrc(5)
* package.json(5)

6
deps/npm/doc/cli/edit.md → deps/npm/doc/cli/npm-edit.md

@ -8,7 +8,7 @@ npm-edit(1) -- Edit an installed package
## DESCRIPTION
Opens the package folder in the default editor (or whatever you've
configured as the npm `editor` config -- see `npm-config(1)`.)
configured as the npm `editor` config -- see `npm-config(7)`.)
After it has been edited, the package is rebuilt so as to pick up any
changes in compiled packages.
@ -29,7 +29,9 @@ The command to run for `npm edit` or `npm config edit`.
## SEE ALSO
* npm-folders(1)
* npm-folders(7)
* npm-explore(1)
* npm-install(1)
* npm-config(1)
* npm-config(7)
* npmrc(5)

2
deps/npm/doc/cli/explore.md → deps/npm/doc/cli/npm-explore.md

@ -33,7 +33,7 @@ The shell to run for the `npm explore` command.
## SEE ALSO
* npm-submodule(1)
* npm-folders(1)
* npm-folders(7)
* npm-edit(1)
* npm-rebuild(1)
* npm-build(1)

2
deps/npm/doc/cli/help-search.md → deps/npm/doc/cli/npm-help-search.md

@ -31,5 +31,5 @@ If false, then help-search will just list out the help topics found.
## SEE ALSO
* npm(1)
* npm-faq(1)
* npm-faq(7)
* npm-help(1)

10
deps/npm/doc/cli/help.md → deps/npm/doc/cli/npm-help.md

@ -30,9 +30,11 @@ Set to `"browser"` to view html help content in the default web browser.
* npm(1)
* README
* npm-faq(1)
* npm-folders(1)
* npm-faq(7)
* npm-folders(7)
* npm-config(1)
* npm-json(1)
* npm-config(7)
* npmrc(5)
* package.json(5)
* npm-help-search(1)
* npm-index(1)
* npm-index(7)

2
deps/npm/doc/cli/init.md → deps/npm/doc/cli/npm-init.md

@ -21,5 +21,5 @@ without a really good reason to do so.
## SEE ALSO
* <https://github.com/isaacs/init-package-json>
* npm-json(1)
* package.json(5)
* npm-version(1)

20
deps/npm/doc/cli/install.md → deps/npm/doc/cli/npm-install.md

@ -70,7 +70,7 @@ after packing it up into a tarball (b).
* `npm install <name> [--save|--save-dev|--save-optional]`:
Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
`npm-config(1)`.)
`npm-config(7)`.)
In most cases, this will install the latest version
of the module published on npm.
@ -121,7 +121,7 @@ after packing it up into a tarball (b).
* `npm install <name>@<version range>`:
Install a version of the package matching the specified version range. This
will follow the same rules for resolving dependencies described in `npm-json(1)`.
will follow the same rules for resolving dependencies described in `package.json(5)`.
Note that most version ranges must be put in quotes so that your shell will
treat it as a single argument.
@ -160,7 +160,7 @@ local copy exists on disk.
npm install sax --force
The `--global` argument will cause npm to install the package globally
rather than locally. See `npm-folders(1)`.
rather than locally. See `npm-folders(7)`.
The `--link` argument will cause npm to link global installs into the
local space in some cases.
@ -174,7 +174,7 @@ shrinkwrap file and use the package.json instead.
The `--nodedir=/path/to/node/source` argument will allow npm to find the
node source code so that npm can compile native modules.
See `npm-config(1)`. Many of the configuration params have some
See `npm-config(7)`. Many of the configuration params have some
effect on installation, since that's most of what npm does.
## ALGORITHM
@ -202,7 +202,7 @@ this algorithm produces:
That is, the dependency from B to C is satisfied by the fact that A
already caused C to be installed at a higher level.
See npm-folders(1) for a more detailed description of the specific
See npm-folders(7) for a more detailed description of the specific
folder structures that npm creates.
### Limitations of npm's Install Algorithm
@ -228,15 +228,17 @@ affects a real use-case, it will be investigated.
## SEE ALSO
* npm-folders(1)
* npm-folders(7)
* npm-update(1)
* npm-link(1)
* npm-rebuild(1)
* npm-scripts(1)
* npm-scripts(7)
* npm-build(1)
* npm-config(1)
* npm-registry(1)
* npm-folders(1)
* npm-config(7)
* npmrc(5)
* npm-registry(7)
* npm-folders(7)
* npm-tag(1)
* npm-rm(1)
* npm-shrinkwrap(1)

10
deps/npm/doc/cli/link.md → deps/npm/doc/cli/npm-link.md

@ -52,9 +52,11 @@ installation target into your project's `node_modules` folder.
## SEE ALSO
* npm-developers(1)
* npm-faq(1)
* npm-json(1)
* npm-developers(7)
* npm-faq(7)
* package.json(5)
* npm-install(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

4
deps/npm/doc/cli/ls.md → deps/npm/doc/cli/npm-ls.md

@ -64,7 +64,9 @@ project.
## SEE ALSO
* npm-config(1)
* npm-folders(1)
* npm-config(7)
* npmrc(5)
* npm-folders(7)
* npm-install(1)
* npm-link(1)
* npm-prune(1)

4
deps/npm/doc/cli/outdated.md → deps/npm/doc/cli/npm-outdated.md

@ -13,5 +13,5 @@ packages are currently outdated.
## SEE ALSO
* npm-update(1)
* npm-registry(1)
* npm-folders(1)
* npm-registry(7)
* npm-folders(7)

4
deps/npm/doc/cli/owner.md → deps/npm/doc/cli/npm-owner.md

@ -28,6 +28,6 @@ that is not implemented at this time.
## SEE ALSO
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)
* npm-adduser(1)
* npm-disputes(1)
* npm-disputes(7)

2
deps/npm/doc/cli/pack.md → deps/npm/doc/cli/npm-pack.md

@ -23,3 +23,5 @@ If no arguments are supplied, then npm packs the current package folder.
* npm-cache(1)
* npm-publish(1)
* npm-config(1)
* npm-config(7)
* npmrc(5)

4
deps/npm/doc/cli/prefix.md → deps/npm/doc/cli/npm-prefix.md

@ -13,5 +13,7 @@ Print the prefix to standard out.
* npm-root(1)
* npm-bin(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

2
deps/npm/doc/cli/prune.md → deps/npm/doc/cli/npm-prune.md

@ -17,5 +17,5 @@ package's dependencies list.
## SEE ALSO
* npm-rm(1)
* npm-folders(1)
* npm-folders(7)
* npm-list(1)

2
deps/npm/doc/cli/publish.md → deps/npm/doc/cli/npm-publish.md

@ -23,7 +23,7 @@ the registry. Overwrites when the "--force" flag is set.
## SEE ALSO
* npm-registry(1)
* npm-registry(7)
* npm-adduser(1)
* npm-owner(1)
* npm-deprecate(1)

0
deps/npm/doc/cli/rebuild.md → deps/npm/doc/cli/npm-rebuild.md

2
deps/npm/doc/cli/restart.md → deps/npm/doc/cli/npm-restart.md

@ -16,7 +16,7 @@ If no version is specified, then it restarts the "active" version.
## SEE ALSO
* npm-run-script(1)
* npm-scripts(1)
* npm-scripts(7)
* npm-test(1)
* npm-start(1)
* npm-stop(1)

4
deps/npm/doc/cli/rm.md → deps/npm/doc/cli/npm-rm.md

@ -15,5 +15,7 @@ on its behalf.
* npm-prune(1)
* npm-install(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

4
deps/npm/doc/cli/root.md → deps/npm/doc/cli/npm-root.md

@ -13,5 +13,7 @@ Print the effective `node_modules` folder to standard out.
* npm-prefix(1)
* npm-bin(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

2
deps/npm/doc/cli/run-script.md → deps/npm/doc/cli/npm-run-script.md

@ -14,7 +14,7 @@ called directly, as well.
## SEE ALSO
* npm-scripts(1)
* npm-scripts(7)
* npm-test(1)
* npm-start(1)
* npm-restart(1)

4
deps/npm/doc/cli/search.md → deps/npm/doc/cli/npm-search.md

@ -15,6 +15,8 @@ expression characters must be escaped or quoted in most shells.)
## SEE ALSO
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-view(1)

2
deps/npm/doc/cli/shrinkwrap.md → deps/npm/doc/cli/npm-shrinkwrap.md

@ -181,5 +181,5 @@ contents rather than versions.
## SEE ALSO
* npm-install(1)
* npm-json(1)
* package.json(5)
* npm-list(1)

0
deps/npm/doc/cli/star.md → deps/npm/doc/cli/npm-star.md

0
deps/npm/doc/cli/stars.md → deps/npm/doc/cli/npm-stars.md

2
deps/npm/doc/cli/start.md → deps/npm/doc/cli/npm-start.md

@ -12,7 +12,7 @@ This runs a package's "start" script, if one was provided.
## SEE ALSO
* npm-run-script(1)
* npm-scripts(1)
* npm-scripts(7)
* npm-test(1)
* npm-restart(1)
* npm-stop(1)

2
deps/npm/doc/cli/stop.md → deps/npm/doc/cli/npm-stop.md

@ -12,7 +12,7 @@ This runs a package's "stop" script, if one was provided.
## SEE ALSO
* npm-run-script(1)
* npm-scripts(1)
* npm-scripts(7)
* npm-test(1)
* npm-start(1)
* npm-restart(1)

2
deps/npm/doc/cli/submodule.md → deps/npm/doc/cli/npm-submodule.md

@ -24,5 +24,5 @@ dependencies into the submodule folder.
## SEE ALSO
* npm-json(1)
* package.json(5)
* git help submodule

4
deps/npm/doc/cli/tag.md → deps/npm/doc/cli/npm-tag.md

@ -13,5 +13,7 @@ Tags the specified version of the package with the specified tag, or the
## SEE ALSO
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

2
deps/npm/doc/cli/test.md → deps/npm/doc/cli/npm-test.md

@ -15,7 +15,7 @@ true.
## SEE ALSO
* npm-run-script(1)
* npm-scripts(1)
* npm-scripts(7)
* npm-start(1)
* npm-restart(1)
* npm-stop(1)

4
deps/npm/doc/cli/uninstall.md → deps/npm/doc/cli/npm-uninstall.md

@ -15,5 +15,7 @@ on its behalf.
* npm-prune(1)
* npm-install(1)
* npm-folders(1)
* npm-folders(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)

2
deps/npm/doc/cli/unpublish.md → deps/npm/doc/cli/npm-unpublish.md

@ -27,6 +27,6 @@ the root package entry is removed from the registry entirely.
* npm-deprecate(1)
* npm-publish(1)
* npm-registry(1)
* npm-registry(7)
* npm-adduser(1)
* npm-owner(1)

4
deps/npm/doc/cli/update.md → deps/npm/doc/cli/npm-update.md

@ -19,6 +19,6 @@ If no package name is specified, all packages in the specified location (global
* npm-install(1)
* npm-outdated(1)
* npm-registry(1)
* npm-folders(1)
* npm-registry(7)
* npm-folders(7)
* npm-list(1)

4
deps/npm/doc/cli/version.md → deps/npm/doc/cli/npm-version.md

@ -41,5 +41,5 @@ in your git config for this to work properly. For example:
## SEE ALSO
* npm-init(1)
* npm-json(1)
* npm-semver(1)
* package.json(5)
* npm-semver(7)

6
deps/npm/doc/cli/view.md → deps/npm/doc/cli/npm-view.md

@ -55,7 +55,7 @@ can do this:
"Person" fields are shown as a string if they would be shown as an
object. So, for example, this will show the list of npm contributors in
the shortened string format. (See `npm-json(1)` for more on this.)
the shortened string format. (See `package.json(5)` for more on this.)
npm view npm contributors
@ -82,6 +82,8 @@ the field name.
## SEE ALSO
* npm-search(1)
* npm-registry(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-docs(1)

2
deps/npm/doc/cli/whoami.md → deps/npm/doc/cli/npm-whoami.md

@ -12,4 +12,6 @@ Print the `username` config to standard output.
## SEE ALSO
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-adduser(1)

16
deps/npm/doc/cli/npm.md

@ -33,7 +33,7 @@ Use `npm ls` to show everything you've installed.
## DIRECTORIES
See `npm-folders(1)` to learn about where npm puts stuff.
See `npm-folders(7)` to learn about where npm puts stuff.
In particular, npm has two modes of operation:
@ -54,7 +54,7 @@ If you're using npm to develop and publish your code, check out the
following help topics:
* json:
Make a package.json file. See `npm-json(1)`.
Make a package.json file. See `package.json(5)`.
* link:
For linking your current working code into Node's path, so that you
don't have to reinstall every time you make a change. Use
@ -95,14 +95,14 @@ npm is extremely configurable. It reads its configuration options from
npm's default configuration options are defined in
lib/utils/config-defs.js. These must not be changed.
See `npm-config(1)` for much much more information.
See `npm-config(7)` for much much more information.
## CONTRIBUTIONS
Patches welcome!
* code:
Read through `npm-coding-style(1)` if you plan to submit code.
Read through `npm-coding-style(7)` if you plan to submit code.
You don't have to agree with it, but you do have to follow it.
* docs:
If you find an error in the documentation, edit the appropriate markdown
@ -146,10 +146,12 @@ See npm-changelog(1)
## SEE ALSO
* npm-help(1)
* npm-faq(1)
* npm-faq(7)
* README
* npm-json(1)
* package.json(5)
* npm-install(1)
* npm-config(1)
* npm-index(1)
* npm-config(7)
* npmrc(5)
* npm-index(7)
* npm(3)

10
deps/npm/doc/cli/folders.md → deps/npm/doc/files/npm-folders.md

@ -1,4 +1,4 @@
npm-folders(1) -- Folder Structures Used by npm
npm-folders(5) -- Folder Structures Used by npm
===============================================
## DESCRIPTION
@ -196,14 +196,16 @@ not be included in the package tarball.
This allows a package maintainer to install all of their dependencies
(and dev dependencies) locally, but only re-publish those items that
cannot be found elsewhere. See `npm-json(1)` for more information.
cannot be found elsewhere. See `package.json(5)` for more information.
## SEE ALSO
* npm-faq(1)
* npm-json(1)
* npm-faq(7)
* package.json(5)
* npm-install(1)
* npm-pack(1)
* npm-cache(1)
* npm-config(1)
* npmrc(5)
* npm-config(7)
* npm-publish(1)

59
deps/npm/doc/files/npmrc.md

@ -0,0 +1,59 @@
npmrc(5) -- The npm config files
================================
## DESCRIPTION
npm gets its config settings from the command line, environment
variables, and `npmrc` files.
The `npm config` command can be used to update and edit the contents
of the user and global npmrc files.
For a list of available configuration options, see npm-config(7).
## FILES
The three relevant files are:
* per-user config file (~/.npmrc)
* global config file ($PREFIX/npmrc)
* npm builtin config file (/path/to/npm/npmrc)
All npm config files are an ini-formatted list of `key = value`
parameters. Environment variables can be replaced using
`${VARIABLE_NAME}`. For example:
prefix = ${HOME}/.npm-packages
Each of these files is loaded, and config options are resolved in
priority order. For example, a setting in the userconfig file would
override the setting in the globalconfig file.
### Per-user config file
`$HOME/.npmrc` (or the `userconfig` param, if set in the environment
or on the command line)
### Global config file
`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
This file is an ini-file formatted list of `key = value` parameters.
Environment variables can be replaced as above.
### Built-in config file
`path/to/npm/itself/npmrc`
This is an unchangeable "builtin" configuration file that npm keeps
consistent across updates. Set fields in here using the `./configure`
script that comes with npm. This is primarily for distribution
maintainers to override default configs in a standard and consistent
manner.
## SEE ALSO
* npm-folders(5)
* npm-config(1)
* npm-config(7)
* package.json(5)
* npm(1)

19
deps/npm/doc/cli/json.md → deps/npm/doc/files/package.json.md

@ -1,5 +1,5 @@
npm-json(1) -- Specifics of npm's package.json handling
=======================================================
package.json(5) -- Specifics of npm's package.json handling
===========================================================
## DESCRIPTION
@ -7,7 +7,7 @@ This document is all you need to know about what's required in your package.json
file. It must be actual JSON, not just a JavaScript object literal.
A lot of the behavior described in this document is affected by the config
settings described in `npm-config(1)`.
settings described in `npm-config(7)`.
## DEFAULT VALUES
@ -315,7 +315,7 @@ The "scripts" member is an object hash of script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
See `npm-scripts(1)` to find out more about writing package scripts.
See `npm-scripts(7)` to find out more about writing package scripts.
## config
@ -330,7 +330,7 @@ and then had a "start" command that then referenced the
`npm_package_config_port` environment variable, then the user could
override that by doing `npm config set foo:port 8001`.
See `npm-config(1)` and `npm-scripts(1)` for more on package
See `npm-config(7)` and `npm-scripts(7)` for more on package
configs.
## dependencies
@ -439,7 +439,7 @@ In this case, it's best to list these additional items in a
These things will be installed whenever the `--dev` configuration flag
is set. This flag is set automatically when doing `npm link` or when doing
`npm install` from the root of a package, and can be managed like any other npm
configuration param. See `npm-config(1)` for more on the topic.
configuration param. See `npm-config(7)` for more on the topic.
## bundledDependencies
@ -571,17 +571,18 @@ the global public registry by default.
Any config values can be overridden, but of course only "tag" and
"registry" probably matter for the purposes of publishing.
See `npm-config(1)` to see the list of config options that can be
See `npm-config(7)` to see the list of config options that can be
overridden.
## SEE ALSO
* npm-semver(1)
* npm-semver(7)
* npm-init(1)
* npm-version(1)
* npm-config(1)
* npm-config(7)
* npm-help(1)
* npm-faq(1)
* npm-faq(7)
* npm-install(1)
* npm-publish(1)
* npm-rm(1)

8
deps/npm/doc/cli/coding-style.md → deps/npm/doc/misc/npm-coding-style.md

@ -1,4 +1,4 @@
npm-coding-style(1) -- npm's "funny" coding style
npm-coding-style(7) -- npm's "funny" coding style
=================================================
## DESCRIPTION
@ -141,7 +141,7 @@ logging the same object over and over again is not helpful. Logs should
report what's happening so that it's easier to track down where a fault
occurs.
Use appropriate log levels. See `npm-config(1)` and search for
Use appropriate log levels. See `npm-config(7)` and search for
"loglevel".
## Case, naming, etc.
@ -176,6 +176,6 @@ Boolean objects are verboten.
## SEE ALSO
* npm-developers(1)
* npm-faq(1)
* npm-developers(7)
* npm-faq(7)
* npm(1)

119
deps/npm/doc/cli/config.md → deps/npm/doc/misc/npm-config.md

@ -1,15 +1,5 @@
npm-config(1) -- Manage the npm configuration file
==================================================
## SYNOPSIS
npm config set <key> <value> [--global]
npm config get <key>
npm config delete <key>
npm config list
npm config edit
npm get <key>
npm set <key> <value> [--global]
npm-config(7) -- More than you probably want to know about npm configuration
============================================================================
## DESCRIPTION
@ -17,87 +7,36 @@ npm gets its configuration values from 6 sources, in this priority:
### Command Line Flags
Putting `--foo bar` on the command line sets the
`foo` configuration parameter to `"bar"`. A `--` argument tells the cli
parser to stop reading flags. A `--flag` parameter that is at the *end* of
the command will be given the value of `true`.
Putting `--foo bar` on the command line sets the `foo` configuration
parameter to `"bar"`. A `--` argument tells the cli parser to stop
reading flags. A `--flag` parameter that is at the *end* of the
command will be given the value of `true`.
### Environment Variables
Any environment variables that start with `npm_config_` will be interpreted
as a configuration parameter. For example, putting `npm_config_foo=bar` in
your environment will set the `foo` configuration parameter to `bar`. Any
environment configurations that are not given a value will be given the value
of `true`. Config values are case-insensitive, so `NPM_CONFIG_FOO=bar` will
work the same.
### Per-user config file
`$HOME/.npmrc` (or the `userconfig` param, if set above)
This file is an ini-file formatted list of `key = value` parameters.
Environment variables can be replaced using `${VARIABLE_NAME}`. For example:
prefix = ${HOME}/.npm-packages
### Global config file
Any environment variables that start with `npm_config_` will be
interpreted as a configuration parameter. For example, putting
`npm_config_foo=bar` in your environment will set the `foo`
configuration parameter to `bar`. Any environment configurations that
are not given a value will be given the value of `true`. Config
values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
same.
`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
This file is an ini-file formatted list of `key = value` parameters.
Environment variables can be replaced as above.
### npmrc Files
### Built-in config file
The three relevant files are:
`path/to/npm/itself/npmrc`
* per-user config file (~/.npmrc)
* global config file ($PREFIX/npmrc)
* npm builtin config file (/path/to/npm/npmrc)
This is an unchangeable "builtin"
configuration file that npm keeps consistent across updates. Set
fields in here using the `./configure` script that comes with npm.
This is primarily for distribution maintainers to override default
configs in a standard and consistent manner.
See npmrc(5) for more details.
### Default Configs
A set of configuration parameters that are internal to npm, and are
defaults if nothing else is specified.
## Sub-commands
Config supports the following sub-commands:
### set
npm config set key value
Sets the config key to the value.
If value is omitted, then it sets it to "true".
### get
npm config get key
Echo the config value to stdout.
### list
npm config list
Show all the config settings.
### delete
npm config delete key
Deletes the key from all configuration files.
### edit
npm config edit
Opens the config file in an editor. Use the `--global` flag to edit the
global config.
## Shorthands and Other CLI Niceties
The following shorthands are parsed on the command-line:
@ -144,10 +83,10 @@ example:
## Per-Package Config Settings
When running scripts (see `npm-scripts(1)`)
the package.json "config" keys are overwritten in the environment if
there is a config param of `<name>[@<version>]:<key>`. For example, if
the package.json has this:
When running scripts (see `npm-scripts(7)`) the package.json "config"
keys are overwritten in the environment if there is a config param of
`<name>[@<version>]:<key>`. For example, if the package.json has
this:
{ "name" : "foo"
, "config" : { "port" : "8080" }
@ -161,6 +100,8 @@ then the user could change the behavior by doing:
npm config set foo:port 80
See package.json(5) for more information.
## Config Settings
### always-auth
@ -371,7 +312,7 @@ the git binary.
Operates in "global" mode, so that packages are installed into the
`prefix` folder instead of the current working directory. See
`npm-folders(1)` for more on the differences in behavior.
`npm-folders(7)` for more on the differences in behavior.
* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
current working directory.
@ -584,7 +525,7 @@ standard output.
### prefix
* Default: see npm-folders(1)
* Default: see npm-folders(7)
* Type: path
The location to install global items. If set on the command line, then
@ -878,5 +819,9 @@ then answer "no" to any prompt.
## SEE ALSO
* npm-folders(1)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-scripts(7)
* npm-folders(5)
* npm(1)

14
deps/npm/doc/cli/developers.md → deps/npm/doc/misc/npm-developers.md

@ -1,4 +1,4 @@
npm-developers(1) -- Developer Guide
npm-developers(7) -- Developer Guide
====================================
## DESCRIPTION
@ -49,7 +49,7 @@ an argument to `git checkout`. The default is `master`.
You need to have a `package.json` file in the root of your project to do
much of anything with npm. That is basically the whole interface.
See `npm-json(1)` for details about what goes in that file. At the very
See `package.json(5)` for details about what goes in that file. At the very
least, you need:
* name:
@ -78,7 +78,7 @@ least, you need:
If you have a special compilation or installation script, then you
should put it in the `scripts` hash. You should definitely have at
least a basic smoke-test command as the "scripts.test" field.
See npm-scripts(1).
See npm-scripts(7).
* main:
If you have a single module that serves as the entry point to your
@ -197,11 +197,11 @@ Tell the world how easy it is to install your program!
## SEE ALSO
* npm-faq(1)
* npm-faq(7)
* npm(1)
* npm-init(1)
* npm-json(1)
* npm-scripts(1)
* package.json(5)
* npm-scripts(7)
* npm-publish(1)
* npm-adduser(1)
* npm-registry(1)
* npm-registry(7)

4
deps/npm/doc/cli/disputes.md → deps/npm/doc/misc/npm-disputes.md

@ -1,4 +1,4 @@
npm-disputes(1) -- Handling Module Name Disputes
npm-disputes(7) -- Handling Module Name Disputes
================================================
## SYNOPSIS
@ -94,5 +94,5 @@ If you see bad behavior like this, please report it right away.
## SEE ALSO
* npm-registry(1)
* npm-registry(7)
* npm-owner(1)

21
deps/npm/doc/cli/faq.md → deps/npm/doc/misc/npm-faq.md

@ -1,4 +1,4 @@
npm-faq(1) -- Frequently Asked Questions
npm-faq(7) -- Frequently Asked Questions
========================================
## Where can I find these docs in HTML?
@ -22,7 +22,7 @@ do what it says and post a bug with all the information it asks for.
## Where does npm put stuff?
See `npm-folders(1)`
See `npm-folders(5)`
tl;dr:
@ -58,7 +58,7 @@ problems than it solves.
It is much harder to avoid dependency conflicts without nesting
dependencies. This is fundamental to the way that npm works, and has
proven to be an extremely successful approach. See `npm-folders(1)` for
proven to be an extremely successful approach. See `npm-folders(5)` for
more details.
If you want a package to be installed in one place, and have all your
@ -280,12 +280,12 @@ Windows:
## How can I use npm for development?
See `npm-developers(1)` and `npm-json(1)`.
See `npm-developers(7)` and `package.json(5)`.
You'll most likely want to `npm link` your development folder. That's
awesomely handy.
To set up your own private registry, check out `npm-registry(1)`.
To set up your own private registry, check out `npm-registry(7)`.
## Can I list a url as a dependency?
@ -299,7 +299,7 @@ See `npm-link(1)`
## The package registry website. What is that exactly?
See `npm-registry(1)`.
See `npm-registry(7)`.
## I forgot my password, and can't publish. How do I reset it?
@ -346,7 +346,10 @@ npm is not capable of hatred. It loves everyone, especially you.
## SEE ALSO
* npm(1)
* npm-developers(1)
* npm-json(1)
* npm-developers(7)
* package.json(5)
* npm-config(1)
* npm-folders(1)
* npm-config(7)
* npmrc(5)
* npm-config(7)
* npm-folders(5)

403
deps/npm/doc/misc/npm-index.md

@ -0,0 +1,403 @@
npm-index(7) -- Index of all npm documentation
==============================================
## README(1)
node package manager
# Command Line Documentation
## npm(1)
node package manager
## npm-adduser(1)
Add a registry user account
## npm-bin(1)
Display npm bin folder
## npm-bugs(1)
Bugs for a package in a web browser maybe
## npm-build(1)
Build a package
## npm-bundle(1)
REMOVED
## npm-cache(1)
Manipulates packages cache
## npm-completion(1)
Tab Completion for npm
## npm-config(1)
Manage the npm configuration files
## npm-dedupe(1)
Reduce duplication
## npm-deprecate(1)
Deprecate a version of a package
## npm-docs(1)
Docs for a package in a web browser maybe
## npm-edit(1)
Edit an installed package
## npm-explore(1)
Browse an installed package
## npm-help-search(1)
Search npm help documentation
## npm-help(1)
Get help on npm
## npm-init(1)
Interactively create a package.json file
## npm-install(1)
Install a package
## npm-link(1)
Symlink a package folder
## npm-ls(1)
List installed packages
## npm-outdated(1)
Check for outdated packages
## npm-owner(1)
Manage package owners
## npm-pack(1)
Create a tarball from a package
## npm-prefix(1)
Display prefix
## npm-prune(1)
Remove extraneous packages
## npm-publish(1)
Publish a package
## npm-rebuild(1)
Rebuild a package
## npm-restart(1)
Start a package
## npm-rm(1)
Remove a package
## npm-root(1)
Display npm root
## npm-run-script(1)
Run arbitrary package scripts
## npm-search(1)
Search for packages
## npm-shrinkwrap(1)
Lock down dependency versions
## npm-star(1)
Mark your favorite packages
## npm-stars(1)
View packages marked as favorites
## npm-start(1)
Start a package
## npm-stop(1)
Stop a package
## npm-submodule(1)
Add a package as a git submodule
## npm-tag(1)
Tag a published version
## npm-test(1)
Test a package
## npm-uninstall(1)
Remove a package
## npm-unpublish(1)
Remove a package from the registry
## npm-update(1)
Update a package
## npm-version(1)
Bump a package version
## npm-view(1)
View registry info
## npm-whoami(1)
Display npm username
# API Documentation
## npm(3)
node package manager
## npm-bin(3)
Display npm bin folder
## npm-bugs(3)
Bugs for a package in a web browser maybe
## npm-commands(3)
npm commands
## npm-config(3)
Manage the npm configuration files
## npm-deprecate(3)
Deprecate a version of a package
## npm-docs(3)
Docs for a package in a web browser maybe
## npm-edit(3)
Edit an installed package
## npm-explore(3)
Browse an installed package
## npm-help-search(3)
Search the help pages
## npm-init(3)
Interactively create a package.json file
## npm-install(3)
install a package programmatically
## npm-link(3)
Symlink a package folder
## npm-load(3)
Load config settings
## npm-ls(3)
List installed packages
## npm-outdated(3)
Check for outdated packages
## npm-owner(3)
Manage package owners
## npm-pack(3)
Create a tarball from a package
## npm-prefix(3)
Display prefix
## npm-prune(3)
Remove extraneous packages
## npm-publish(3)
Publish a package
## npm-rebuild(3)
Rebuild a package
## npm-restart(3)
Start a package
## npm-root(3)
Display npm root
## npm-run-script(3)
Run arbitrary package scripts
## npm-search(3)
Search for packages
## npm-shrinkwrap(3)
programmatically generate package shrinkwrap file
## npm-start(3)
Start a package
## npm-stop(3)
Stop a package
## npm-submodule(3)
Add a package as a git submodule
## npm-tag(3)
Tag a published version
## npm-test(3)
Test a package
## npm-uninstall(3)
uninstall a package programmatically
## npm-unpublish(3)
Remove a package from the registry
## npm-update(3)
Update a package
## npm-version(3)
Bump a package version
## npm-view(3)
View registry info
## npm-whoami(3)
Display npm username
# Files
## npm-folders(5)
Folder Structures Used by npm
## npmrc(5)
The npm config files
## package.json(5)
Specifics of npm's package.json handling
# Misc
## npm-coding-style(7)
npm's "funny" coding style
## npm-config(7)
More than you probably want to know about npm configuration
## npm-developers(7)
Developer Guide
## npm-disputes(7)
Handling Module Name Disputes
## npm-faq(7)
Frequently Asked Questions
## npm-index(7)
Index of all npm documentation
## npm-registry(7)
The JavaScript Package Registry
## npm-scripts(7)
How npm handles the "scripts" field
## removing-npm(7)
Cleaning the Slate
## semver(7)
The semantic versioner for npm

13
deps/npm/doc/cli/registry.md → deps/npm/doc/misc/npm-registry.md

@ -1,4 +1,4 @@
npm-registry(1) -- The JavaScript Package Registry
npm-registry(7) -- The JavaScript Package Registry
==================================================
## DESCRIPTION
@ -19,7 +19,8 @@ are CouchDB users, stored in the <http://isaacs.iriscouch.com/_users>
database.
The registry URL is supplied by the `registry` config parameter. See
`npm-config(1)` for more on managing npm's configuration.
`npm-config(1)`, `npmrc(5)`, and `npm-config(7)` for more on managing
npm's configuration.
## Can I run my own private registry?
@ -42,7 +43,7 @@ published at all, or
`"publishConfig":{"registry":"http://my-internal-registry.local"}`
to force it to be published only to your internal registry.
See `npm-json(1)` for more info on what goes in the package.json file.
See `package.json(5)` for more info on what goes in the package.json file.
## Will you replicate from my registry into the public one?
@ -87,5 +88,7 @@ Yes, head over to <https://npmjs.org/>
## SEE ALSO
* npm-config(1)
* npm-developers(1)
* npm-disputes(1)
* npm-config(7)
* npmrc(5)
* npm-developers(7)
* npm-disputes(7)

118
deps/npm/doc/cli/scripts.md → deps/npm/doc/misc/npm-scripts.md

@ -1,4 +1,4 @@
npm-scripts(1) -- How npm handles the "scripts" field
npm-scripts(7) -- How npm handles the "scripts" field
=====================================================
## DESCRIPTION
@ -96,49 +96,50 @@ npm will default some script values based on package contents.
## USER
If npm was invoked with root privileges, then it will change the uid to
the user account or uid specified by the `user` config, which defaults
to `nobody`. Set the `unsafe-perm` flag to run scripts with root
privileges.
If npm was invoked with root privileges, then it will change the uid
to the user account or uid specified by the `user` config, which
defaults to `nobody`. Set the `unsafe-perm` flag to run scripts with
root privileges.
## ENVIRONMENT
Package scripts run in an environment where many pieces of information are
made available regarding the setup of npm and the current state of the
process.
Package scripts run in an environment where many pieces of information
are made available regarding the setup of npm and the current state of
the process.
### path
If you depend on modules that define executable scripts, like test suites,
then those executables will be added to the `PATH` for executing the scripts.
So, if your package.json has this:
If you depend on modules that define executable scripts, like test
suites, then those executables will be added to the `PATH` for
executing the scripts. So, if your package.json has this:
{ "name" : "foo"
, "dependencies" : { "bar" : "0.1.x" }
, "scripts": { "start" : "bar ./test" } }
then you could run `npm start` to execute the `bar` script, which is exported
into the `node_modules/.bin` directory on `npm install`.
then you could run `npm start` to execute the `bar` script, which is
exported into the `node_modules/.bin` directory on `npm install`.
### package.json vars
The package.json fields are tacked onto the `npm_package_` prefix. So, for
instance, if you had `{"name":"foo", "version":"1.2.5"}` in your package.json
file, then your package scripts would have the `npm_package_name` environment
variable set to "foo", and the `npm_package_version` set to "1.2.5"
The package.json fields are tacked onto the `npm_package_` prefix. So,
for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your
package.json file, then your package scripts would have the
`npm_package_name` environment variable set to "foo", and the
`npm_package_version` set to "1.2.5"
### configuration
Configuration parameters are put in the environment with the `npm_config_`
prefix. For instance, you can view the effective `root` config by checking the
`npm_config_root` environment variable.
Configuration parameters are put in the environment with the
`npm_config_` prefix. For instance, you can view the effective `root`
config by checking the `npm_config_root` environment variable.
### Special: package.json "config" hash
The package.json "config" keys are overwritten in the environment if
there is a config param of `<name>[@<version>]:<key>`. For example, if
the package.json has this:
there is a config param of `<name>[@<version>]:<key>`. For example,
if the package.json has this:
{ "name" : "foo"
, "config" : { "port" : "8080" }
@ -154,15 +155,14 @@ then the user could change the behavior by doing:
### current lifecycle event
Lastly, the `npm_lifecycle_event` environment variable is set to whichever
stage of the cycle is being executed. So, you could have a single script used
for different parts of the process which switches based on what's currently
happening.
Lastly, the `npm_lifecycle_event` environment variable is set to
whichever stage of the cycle is being executed. So, you could have a
single script used for different parts of the process which switches
based on what's currently happening.
Objects are flattened following this format, so if you had
`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd see this
in the script:
`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd
see this in the script:
process.env.npm_package_scripts_install === "foo.js"
@ -177,13 +177,15 @@ For example, if your package.json contains this:
}
}
then the `scripts/install.js` will be called for the install, post-install,
stages of the lifecycle, and the `scripts/uninstall.js` would be
called when the package is uninstalled. Since `scripts/install.js` is running
for three different phases, it would be wise in this case to look at the
`npm_lifecycle_event` environment variable.
then the `scripts/install.js` will be called for the install,
post-install, stages of the lifecycle, and the `scripts/uninstall.js`
would be called when the package is uninstalled. Since
`scripts/install.js` is running for three different phases, it would
be wise in this case to look at the `npm_lifecycle_event` environment
variable.
If you want to run a make command, you can do so. This works just fine:
If you want to run a make command, you can do so. This works just
fine:
{ "scripts" :
{ "preinstall" : "./configure"
@ -199,43 +201,45 @@ Scripts are run by passing the line as a script argument to `sh`.
If the script exits with a code other than 0, then this will abort the
process.
Note that these script files don't have to be nodejs or even javascript
programs. They just have to be some kind of executable file.
Note that these script files don't have to be nodejs or even
javascript programs. They just have to be some kind of executable
file.
## HOOK SCRIPTS
If you want to run a specific script at a specific lifecycle event for ALL
packages, then you can use a hook script.
If you want to run a specific script at a specific lifecycle event for
ALL packages, then you can use a hook script.
Place an executable file at `node_modules/.hooks/{eventname}`, and it'll get
run for all packages when they are going through that point in the package
lifecycle for any packages installed in that root.
Place an executable file at `node_modules/.hooks/{eventname}`, and
it'll get run for all packages when they are going through that point
in the package lifecycle for any packages installed in that root.
Hook scripts are run exactly the same way as package.json scripts. That is,
they are in a separate child process, with the env described above.
Hook scripts are run exactly the same way as package.json scripts.
That is, they are in a separate child process, with the env described
above.
## BEST PRACTICES
* Don't exit with a non-zero error code unless you *really* mean it.
Except for uninstall scripts, this will cause the npm action
to fail, and potentially be rolled back. If the failure is minor or
Except for uninstall scripts, this will cause the npm action to
fail, and potentially be rolled back. If the failure is minor or
only will prevent some optional features, then it's better to just
print a warning and exit successfully.
* Try not to use scripts to do what npm can do for you. Read through
`npm-json(1)` to see all the things that you can specify and enable
by simply describing your package appropriately. In general, this will
lead to a more robust and consistent state.
`package.json(5)` to see all the things that you can specify and enable
by simply describing your package appropriately. In general, this
will lead to a more robust and consistent state.
* Inspect the env to determine where to put things. For instance, if
the `npm_config_binroot` environ is set to `/home/user/bin`, then don't
try to install executables into `/usr/local/bin`. The user probably
set it up that way for a reason.
* Don't prefix your script commands with "sudo". If root permissions are
required for some reason, then it'll fail with that error, and the user
will sudo the npm command in question.
the `npm_config_binroot` environ is set to `/home/user/bin`, then
don't try to install executables into `/usr/local/bin`. The user
probably set it up that way for a reason.
* Don't prefix your script commands with "sudo". If root permissions
are required for some reason, then it'll fail with that error, and
the user will sudo the npm command in question.
## SEE ALSO
* npm-run-script(1)
* npm-json(1)
* npm-developers(1)
* package.json(5)
* npm-developers(7)
* npm-install(1)

0
deps/npm/doc/cli/removing-npm.md → deps/npm/doc/misc/removing-npm.md

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save