Welcome to mirror list, hosted at ThFree Co, Russian Federation.

folders.md « doc - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bfc022411a1078c4cabb30f3e1d48ac4d5bf3742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
npm-folders(1) -- Folder Structures Used by npm
===============================================

## DESCRIPTION

Node modules and metadata live
in the `root` setting.  Check `npm help config` for more
on configuration options.

`root/foo` Symlink to the active version's module folder.

`root/foo@1.0.0/` Node modules for the foo package.

`root/foo@1.0.0/{module-name}.js` Generated shim corresponding to a module
defined in the modules option. The module shim requires
`root/.npm/foo/1.0.0/package/{module-path}.js`

The `main` script is implemented by creating an `index.js` file in this folder.

`root/.npm/foo` is where the stuff for package `foo` would go.

`root/.npm/foo/1.0.0/package` the contents of the tarball containing foo
version 1.0.0

`root/.npm/foo/1.0.0/main.js` Generated file that exports the `main` module in
foo.  This is a shim, not a symbolic link, so that relative paths will work
appropriately.

`root/.npm/foo/active` symlink to the active version.

`root/.npm/foo/1.0.0/node_modules` links to the modules that foo depends upon.
This is loaded into the require path first in the foo shims.

`root/.npm/foo/1.0.0/dependson` links to the package folders that foo depends
on.  This is here so that npm can access those packages programmatically.

`root/.npm/foo/1.0.0/dependents` links to the packages that depend upon foo.

`root/.npm/.cache` the cache folder.

`root/.npm/.cache/foo/1.0.0/package.json` the parsed package.json for foo@1.0.0

`root/.npm/.cache/foo/1.0.0/package.tgz` the tarball of foo@1.0.0

`root/.npm/.cache/foo/1.0.0/package` the untouched pristine copy of foo@1.0.0

Executables are installed to the folder specified by the `binroot` config.

`binroot/foo` Symlink to the active version of the "foo" executable.

`binroot/foo@1.0.0` An executable for foo at version 1.0.0.  Either a
symbolic link or a shim to a file in the foo package.

Man pages are installed to the folder specified by the `manroot` config.
Man pages named something other than the package name are prefixed with
the package name.

`manroot/man1/foo.1` Symlink to the section 1 manpage for the active
version of foo.

`manroot/man1/foo@1.0.0.1` Section 1 man page for foo version 1.0.0

`manroot/man8/foo-bar.8` Symlink to a section 8 manpage for the active
version of foo.

`manroot/man8/foo-bar@1.0.0.8` A section 8 manpage for foo version
1.0.0.

## CONFIGURATION

### root

Default: `$INSTALL_PREFIX/lib/node`

The root folder where packages are installed and npm keeps its data.

### binroot

Default: `$INSTALL_PREFIX/bin`

The folder where executable programs are installed.

Set to "false" to not install executables

### manroot

Default: $INSTALL_PREFIX/share/man

The folder where man pages are installed.

Set to "false" to not install man pages.