The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / npm / man / man3 / link.3 @ d46ebffb

History | View | Annotate | Download (1.18 KB)

1
.\" Generated with Ronnjs 0.3.8
2
.\" http://github.com/kapouer/ronnjs/
3
.
4
.TH "NPM\-LINK" "3" "April 2013" "" ""
5
.
6
.SH "NAME"
7
\fBnpm-link\fR \-\- Symlink a package folder
8
.
9
.SH "SYNOPSIS"
10
.
11
.nf
12
npm\.command\.link(callback)
13
npm\.command\.link(packages, callback)
14
.
15
.fi
16
.
17
.SH "DESCRIPTION"
18
Package linking is a two\-step process\.
19
.
20
.P
21
Without parameters, link will create a globally\-installed
22
symbolic link from \fBprefix/package\-name\fR to the current folder\.
23
.
24
.P
25
With a parameters, link will create a symlink from the local \fBnode_modules\fR
26
folder to the global symlink\.
27
.
28
.P
29
When creating tarballs for \fBnpm publish\fR, the linked packages are
30
"snapshotted" to their current state by resolving the symbolic links\.
31
.
32
.P
33
This is
34
handy for installing your own stuff, so that you can work on it and test it
35
iteratively without having to continually rebuild\.
36
.
37
.P
38
For example:
39
.
40
.IP "" 4
41
.
42
.nf
43
npm\.commands\.link(cb)           # creates global link from the cwd
44
                                # (say redis package)
45
npm\.commands\.link(\'redis\', cb)  # link\-install the package
46
.
47
.fi
48
.
49
.IP "" 0
50
.
51
.P
52
Now, any changes to the redis package will be reflected in
53
the package in the current working directory