3 <title>npm-link</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../api/npm-link.html">npm-link</a></h1> <p>Symlink a package folder</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>npm.command.link(callback)
14 npm.command.link(packages, callback)</code></pre>
16 <h2 id="DESCRIPTION">DESCRIPTION</h2>
18 <p>Package linking is a two-step process.</p>
20 <p>Without parameters, link will create a globally-installed
21 symbolic link from <code>prefix/package-name</code> to the current folder.</p>
23 <p>With a parameters, link will create a symlink from the local <code>node_modules</code>
24 folder to the global symlink.</p>
26 <p>When creating tarballs for <code>npm publish</code>, the linked packages are
27 "snapshotted" to their current state by resolving the symbolic links.</p>
30 handy for installing your own stuff, so that you can work on it and test it
31 iteratively without having to continually rebuild.</p>
35 <pre><code>npm.commands.link(cb) # creates global link from the cwd
37 npm.commands.link('redis', cb) # link-install the package</code></pre>
39 <p>Now, any changes to the redis package will be reflected in
40 the package in the current working directory</p>
42 <p id="footer">npm-link — npm@1.3.11</p>
45 var wrapper = document.getElementById("wrapper")
46 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
47 .filter(function (el) {
48 return el.parentNode === wrapper
49 && el.tagName.match(/H[1-6]/)
53 , toc = document.createElement("ul")
54 toc.innerHTML = els.map(function (el) {
55 var i = el.tagName.charAt(1)
65 out += "<li><a href='#" + el.id + "'>" +
66 ( el.innerText || el.text || el.innerHTML)
71 document.body.appendChild(toc)