HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/douven.komma.pro/node_modules/npm/man/man1/npm-link.1
.TH "NPM\-LINK" "1" "February 2018" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
.P
.RS 2
.nf
npm link (in package dir)
npm link [<@scope>/]<pkg>[@<version>]

alias: npm ln
.fi
.RE
.SH DESCRIPTION
.P
Package linking is a two\-step process\.
.P
First, \fB\fP in a package folder will create a symlink in the global folder
\fB\fP that links to the package where the \fB\fP command was executed\. (see \fB\fP for the value of \fB\fP)\. It
will also link any bins in the package to \fB\fP\|\.
.P
Next, in some other location, \fB\fP will create a
symbolic link from globally\-installed \fB\fP to \fB\fP
of the current folder\.
.P
Note that \fB\fP is taken from \fB\fP,
not from directory name\.
.P
The package name can be optionally prefixed with a scope\. See \fB\fP\|\.
The scope must be preceded by an @\-symbol and followed by a slash\.
.P
When creating tarballs for \fB\fP, the linked packages are
"snapshotted" to their current state by resolving the symbolic links\.
.P
This is handy for installing your own stuff, so that you can work on it and
test it iteratively without having to continually rebuild\.
.P
For example:
.P
.RS 2
.nf
cd ~/projects/node\-redis    # go into the package directory
npm link                    # creates global link
cd ~/projects/node\-bloggy   # go into some other package directory\.
npm link redis              # link\-install the package
.fi
.RE
.P
Now, any changes to ~/projects/node\-redis will be reflected in
~/projects/node\-bloggy/node_modules/node\-redis/\. Note that the link should
be to the package name, not the directory name for that package\.
.P
You may also shortcut the two steps in one\.  For example, to do the
above use\-case in a shorter way:
.P
.RS 2
.nf
cd ~/projects/node\-bloggy  # go into the dir of your main project
npm link \.\./node\-redis     # link the dir of your dependency
.fi
.RE
.P
The second line is the equivalent of doing:
.P
.RS 2
.nf
(cd \.\./node\-redis; npm link)
npm link node\-redis
.fi
.RE
.P
That is, it first creates a global link, and then links the global
installation target into your project's \fB\fP folder\.
.P
If your linked package is scoped (see \fB\fP) your link command must
include that scope, e\.g\.
.P
.RS 2
.nf
npm link @myorg/privatepackage
.fi
.RE
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help 7 developers
.IP \(bu 2
npm help 5 package\.json
.IP \(bu 2
npm help install
.IP \(bu 2
npm help 5 folders
.IP \(bu 2
npm help config
.IP \(bu 2
npm help 7 config
.IP \(bu 2
npm help 5 npmrc

.RE