@@ -168,20 +168,19 @@ <h3 id="cache-min">cache-min</h3>
<p>Note that no purging is done unless the <code>npm cache clean</code> command is
explicitly used, and that only GET requests use the cache.</p>

<h3 id="cert">cert</h3>

<ul><li>Default: <code>null</code></li><li>Type: String</li></ul>

<p>A client certificate to pass when accessing the registry.</p>

<h3 id="color">color</h3>

<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>&quot;always&quot;</code></li></ul>

<p>If false, never shows colors. If <code>&quot;always&quot;</code> then always shows colors.
If true, then only prints color codes for tty file descriptors.</p>

<h3 id="coverage">coverage</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>

<p>A flag to tell test-harness to run with their coverage options enabled,
if they respond to the <code>npm_config_coverage</code> environment variable.</p>

<h3 id="depth">depth</h3>

<ul><li>Default: Infinity</li><li>Type: Number</li></ul>
@@ -211,6 +210,12 @@ <h3 id="editor">editor</h3>

<p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p>

<h3 id="email">email</h3>

<p>The email of the logged-in user.</p>

<p>Set by the <code>npm adduser</code> command. Should not be set explicitly.</p>

<h3 id="engine-strict">engine-strict</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -263,6 +268,12 @@ <h3 id="git">git</h3>
computer, but is not in the <code>PATH</code>, then set this to the full path to
the git binary.</p>

<h3 id="git-tag-version">git-tag-version</h3>

<ul><li>Default: <code>true</code></li><li>Type: Boolean</li></ul>

<p>Tag the commit when using the <code>npm version</code> command.</p>

<h3 id="global">global</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -280,42 +291,31 @@ <h3 id="globalconfig">globalconfig</h3>

<p>The config file to read for global config options.</p>

<h3 id="globalignorefile">globalignorefile</h3>

<ul><li>Default: {prefix}/etc/npmignore</li><li>Type: path</li></ul>

<p>The config file to read for global ignore patterns to apply to all users
and all projects.</p>

<p>If not found, but there is a &quot;gitignore&quot; file in the
same directory, then that will be used instead.</p>

<h3 id="group">group</h3>

<ul><li>Default: GID of the current process</li><li>Type: String or Number</li></ul>

<p>The group to use when running package scripts in global mode as the root
user.</p>

<h3 id="heading">heading</h3>

<ul><li>Default: <code>&quot;npm&quot;</code></li><li>Type: String</li></ul>

<p>The string that starts all the debugging log output.</p>

<h3 id="https-proxy">https-proxy</h3>

<ul><li>Default: the <code>HTTPS_PROXY</code> or <code>https_proxy</code> or <code>HTTP_PROXY</code> or
<code>http_proxy</code> environment variables.</li><li>Type: url</li></ul>

<p>A proxy to use for outgoing https requests.</p>

<h3 id="user-agent">user-agent</h3>

<ul><li>Default: node/{process.version} {process.platform} {process.arch}</li><li>Type: String</li></ul>

<p>Sets a User-Agent to the request header</p>
<h3 id="ignore-scripts">ignore-scripts</h3>

<h3 id="ignore">ignore</h3>

<ul><li>Default: &quot;&quot;</li><li>Type: string</li></ul>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>

<p>A white-space separated list of glob patterns of files to always exclude
from packages when building tarballs.</p>
<p>If true, npm does not run scripts specified in package.json files.</p>

<h3 id="init-module">init-module</h3>

@@ -326,12 +326,6 @@ <h3 id="init-module">init-module</h3>
<a href="https://github.com/isaacs/init-package-json">init-package-json</a> module
for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>

<h3 id="init-version">init.version</h3>

<ul><li>Default: &quot;0.0.0&quot;</li><li>Type: semver</li></ul>

<p>The value <code>npm init</code> should use by default for the package version.</p>

<h3 id="init-author-name">init.author.name</h3>

<ul><li>Default: &quot;&quot;</li><li>Type: String</li></ul>
@@ -350,6 +344,12 @@ <h3 id="init-author-url">init.author.url</h3>

<p>The value <code>npm init</code> should use by default for the package author&#39;s homepage.</p>

<h3 id="init-license">init.license</h3>

<ul><li>Default: &quot;BSD-2-Clause&quot;</li><li>Type: String</li></ul>

<p>The value <code>npm init</code> should use by default for the package license.</p>

<h3 id="json">json</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -360,6 +360,12 @@ <h3 id="json">json</h3>
for many commands is either not implemented in JSON yet, or subject to
change. Only the output from <code>npm ls --json</code> is currently valid.</p>

<h3 id="key">key</h3>

<ul><li>Default: <code>null</code></li><li>Type: String</li></ul>

<p>A client key to pass when accessing the registry.</p>

<h3 id="link">link</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -374,6 +380,13 @@ <h3 id="link">link</h3>
<ul><li>The package is not already installed globally, or</li><li>the globally installed version is identical to the version that is
being installed locally.</li></ul>

<h3 id="local-address">local-address</h3>

<ul><li>Default: undefined</li><li>Type: IP Address</li></ul>

<p>The IP address of the local interface to use when making connections
to the npm registry. Must be IPv4 in versions of Node prior to 0.12.</p>

<h3 id="loglevel">loglevel</h3>

<ul><li>Default: &quot;http&quot;</li><li>Type: String</li><li>Values: &quot;silent&quot;, &quot;win&quot;, &quot;error&quot;, &quot;warn&quot;, &quot;http&quot;, &quot;info&quot;, &quot;verbose&quot;, &quot;silly&quot;</li></ul>
@@ -402,7 +415,7 @@ <h3 id="long">long</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>

<p>Show extended information in <code>npm ls</code></p>
<p>Show extended information in <code>npm ls</code> and <code>npm search</code>.</p>

<h3 id="message">message</h3>

@@ -422,14 +435,7 @@ <h3 id="npat">npat</h3>

<ul><li>Default: false</li><li>Type: Boolean</li></ul>

<p>Run tests on installation and report results to the
<code>npaturl</code>.</p>

<h3 id="npaturl">npaturl</h3>

<ul><li>Default: Not yet implemented</li><li>Type: url</li></ul>

<p>The url to report npat test results.</p>
<p>Run tests on installation.</p>

<h3 id="onload-script">onload-script</h3>

@@ -658,15 +664,6 @@ <h3 id="userconfig">userconfig</h3>

<p>The location of user-level configuration settings.</p>

<h3 id="userignorefile">userignorefile</h3>

<ul><li>Default: ~/.npmignore</li><li>Type: path</li></ul>

<p>The location of a user-level ignore file to apply to all packages.</p>

<p>If not found, but there is a .gitignore file in the same directory, then
that will be used instead.</p>

<h3 id="umask">umask</h3>

<ul><li>Default: 022</li><li>Type: Octal numeric string</li></ul>
@@ -678,6 +675,12 @@ <h3 id="umask">umask</h3>
this value. Other files are given a mode which is <code>0666</code> masked against
this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p>

<h3 id="user-agent">user-agent</h3>

<ul><li>Default: node/{process.version} {process.platform} {process.arch}</li><li>Type: String</li></ul>

<p>Sets a User-Agent to the request header</p>

<h3 id="version">version</h3>

<ul><li>Default: false</li><li>Type: boolean</li></ul>
@@ -703,21 +706,11 @@ <h3 id="viewer">viewer</h3>

<p>Set to <code>&quot;browser&quot;</code> to view html help content in the default web browser.</p>

<h3 id="yes">yes</h3>

<ul><li>Default: null</li><li>Type: Boolean or null</li></ul>

<p>If set to <code>null</code>, then prompt the user for responses in some
circumstances.</p>

<p>If set to <code>true</code>, then answer &quot;yes&quot; to any prompt. If set to <code>false</code>
then answer &quot;no&quot; to any prompt.</p>

<h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
</div>
<p id="footer">npm-config &mdash; npm@1.3.15</p>
<p id="footer">npm-config &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -174,7 +174,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul>
</div>
<p id="footer">npm-developers &mdash; npm@1.3.15</p>
<p id="footer">npm-developers &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -91,7 +91,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul>
</div>
<p id="footer">npm-disputes &mdash; npm@1.3.15</p>
<p id="footer">npm-disputes &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -269,7 +269,7 @@ <h2 id="How-do-I-install-node-with-npm">How do I install node with npm?</h2>

<p>Windows:</p>

<ul><li><a href="http://github.com/marcelklehr/nodist">http://github.com/marcelklehr/nodist</a></li><li><a href="https://github.com/hakobera/nvmw">https://github.com/hakobera/nvmw</a></li></ul>
<ul><li><a href="http://github.com/marcelklehr/nodist">http://github.com/marcelklehr/nodist</a></li><li><a href="https://github.com/hakobera/nvmw">https://github.com/hakobera/nvmw</a></li><li><a href="https://github.com/nanjingboy/nvmw">https://github.com/nanjingboy/nvmw</a></li></ul>

<h2 id="How-can-I-use-npm-for-development">How can I use npm for development?</h2>

@@ -340,7 +340,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul>
</div>
<p id="footer">npm-faq &mdash; npm@1.3.15</p>
<p id="footer">npm-faq &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -122,6 +122,10 @@ <h2 id="npm-rebuild-1"><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></h2>

<p>Rebuild a package</p>

<h2 id="npm-repo-1"><a href="../cli/npm-repo.html">npm-repo(1)</a></h2>

<p>Open package repository page in the browser</p>

<h2 id="npm-restart-1"><a href="../cli/npm-restart.html">npm-restart(1)</a></h2>

<p>Start a package</p>
@@ -198,10 +202,6 @@ <h2 id="npm-whoami-1"><a href="../cli/npm-whoami.html">npm-whoami(1)</a></h2>

<p>Display npm username</p>

<h2 id="repo-1"><a href="../cli/repo.html">repo(1)</a></h2>

<p>Open package repository page in the browser</p>

<h1>API Documentation</h1>

<h2 id="npm-3"><a href="../api/npm.html">npm(3)</a></h2>
@@ -292,6 +292,10 @@ <h2 id="npm-rebuild-3"><a href="../api/npm-rebuild.html">npm-rebuild(3)</a></h2>

<p>Rebuild a package</p>

<h2 id="npm-repo-3"><a href="../api/npm-repo.html">npm-repo(3)</a></h2>

<p>Open package repository page in the browser</p>

<h2 id="npm-restart-3"><a href="../api/npm-restart.html">npm-restart(3)</a></h2>

<p>Start a package</p>
@@ -356,10 +360,6 @@ <h2 id="npm-whoami-3"><a href="../api/npm-whoami.html">npm-whoami(3)</a></h2>

<p>Display npm username</p>

<h2 id="repo-3"><a href="../api/repo.html">repo(3)</a></h2>

<p>Open package repository page in the browser</p>

<h1>Files</h1>

<h2 id="npm-folders-5"><a href="../files/npm-folders.html">npm-folders(5)</a></h2>
@@ -416,7 +416,7 @@ <h2 id="semver-7"><a href="../misc/semver.html">semver(7)</a></h2>

<p>The semantic versioner for npm</p>
</div>
<p id="footer">npm-index &mdash; npm@1.3.15</p>
<p id="footer">npm-index &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -71,7 +71,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
</div>
<p id="footer">npm-registry &mdash; npm@1.3.15</p>
<p id="footer">npm-registry &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -223,7 +223,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul>
</div>
<p id="footer">npm-scripts &mdash; npm@1.3.15</p>
<p id="footer">npm-scripts &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -58,7 +58,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul>
</div>
<p id="footer">removing-npm &mdash; npm@1.3.15</p>
<p id="footer">removing-npm &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -94,7 +94,7 @@ <h3 id="Ranges">Ranges</h3>
range.</li><li>maxSatisfying(versions, range): Return the highest version in the list
that satisfies the range, or null if none of them do.</li></ul>
</div>
<p id="footer">semver &mdash; npm@1.3.15</p>
<p id="footer">semver &mdash; npm@1.3.25</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
@@ -1,24 +1,3 @@
/*
Webfont: Gubblebum Blocky by Jelloween
License: http://www.myfonts.com/viewlicense?type=web&buildid=2303021
Webfonts copyright: Copyright (c) 2007 by Tjarda Koster. All rights reserved.
"Gubblebum Blocky" font
Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com
included for use in the npm website and documentation,
used with permission.
*/

@font-face {
font-family: gubblefont;
src: url('webfonts/23242D_3_0.eot');
src: url('webfonts/23242D_3_0.eot?#iefix') format('embedded-opentype'),
url('webfonts/23242D_3_0.woff') format('woff'),
url('webfonts/23242D_3_0.ttf') format('truetype');
}

/* reset */
* {
margin:0;
@@ -143,7 +122,7 @@ small, .small, .small *, aside {
color:#669;
font-size:18px;
}
spall a, .small a {
small a, .small a {
text-decoration:underline;
}
del {
@@ -169,7 +148,7 @@ h1 {
background:#fff;
}
h1 a, h1 a:visited {
font-family:gubblefont, Gubblebum-Blocky, GubbleBum Blocky, GubbleBum, monospace;
font-family:monospace;
font-size:60px;
color:#900;
display:block;
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,9 +18,9 @@ function adduser (args, cb) {
if (!crypto) return cb(new Error(
"You must compile node with ssl support to use the adduser feature"))

var c = { u : npm.config.get("username")
, p : npm.config.get("_password")
, e : npm.config.get("email")
var c = { u : npm.config.get("username") || ""
, p : npm.config.get("_password") || ""
, e : npm.config.get("email") || ""
}
, changed = false
, u = {}
@@ -37,7 +37,7 @@ function adduser (args, cb) {

function readUsername (c, u, cb) {
var v = userValidate.username
read({prompt: "Username: ", default: c.u}, function (er, un) {
read({prompt: "Username: ", default: c.u || ""}, function (er, un) {
if (er) {
return cb(er.message === "cancelled" ? er.message : er)
}
@@ -92,8 +92,8 @@ function readPassword (c, u, cb) {

function readEmail (c, u, cb) {
var v = userValidate.email

read({prompt: "Email: ", default: c.e}, function (er, em) {
var r = { prompt: "Email: (this IS public) ", default: c.e || "" }
read(r, function (er, em) {
if (er) {
return cb(er.message === "cancelled" ? er.message : er)
}
@@ -7,6 +7,9 @@ var npm = require("./npm.js")
, registry = npm.registry
, log = require("npmlog")
, opener = require("opener")
, path = require("path")
, readJson = require("read-package-json")
, fs = require("fs")

bugs.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
@@ -16,28 +19,43 @@ bugs.completion = function (opts, cb) {
}

function bugs (args, cb) {
if (!args.length) return cb(bugs.usage)
var n = args[0].split("@").shift()
var n = args.length && args[0].split("@").shift() || '.'
fs.stat(n, function (er, s) {
if (er && er.code === "ENOENT") return callRegistry(n, cb)
else if (er) return cb (er)
if (!s.isDirectory()) return callRegistry(n, cb)
readJson(path.resolve(n, "package.json"), function(er, d) {
if (er) return cb(err)
getUrlAndOpen(d, cb)
})
})
}

function getUrlAndOpen (d, cb) {
var bugs = d.bugs
, repo = d.repository || d.repositories
, url
if (bugs) {
url = (typeof url === "string") ? bugs : bugs.url
} else if (repo) {
if (Array.isArray(repo)) repo = repo.shift()
if (repo.hasOwnProperty("url")) repo = repo.url
log.verbose("repository", repo)
if (bugs && bugs.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
url = bugs.replace(/^git(@|:\/\/)/, "https://")
.replace(/^https?:\/\/github.com:/, "https://github.com/")
.replace(/\.git$/, '')+"/issues"
}
}
if (!url) {
url = "https://npmjs.org/package/" + d.name
}
opener(url, { command: npm.config.get("browser") }, cb)
}

function callRegistry (n, cb) {
registry.get(n + "/latest", 3600, function (er, d) {
if (er) return cb(er)
var bugs = d.bugs
, repo = d.repository || d.repositories
, url
if (bugs) {
url = (typeof bugs === "string") ? bugs : bugs.url
} else if (repo) {
if (Array.isArray(repo)) repo = repo.shift()
if (repo.hasOwnProperty("url")) repo = repo.url
log.verbose("repository", repo)
if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
url = repo.replace(/^git(@|:\/\/)/, "https://")
.replace(/^https?:\/\/github.com:/, "https://github.com/")
.replace(/\.git$/, '')+"/issues"
}
}
if (!url) {
url = "https://npmjs.org/package/" + d.name
}
opener(url, { command: npm.config.get("browser") }, cb)
getUrlAndOpen (d, cb)
})
}
@@ -174,10 +174,13 @@ function linkBins (pkg, folder, parent, gtop, cb) {
if (er) return cb(er)
// bins should always be executable.
// XXX skip chmod on windows?
fs.chmod(path.resolve(folder, pkg.bin[b]), npm.modes.exec, function (er) {
var src = path.resolve(folder, pkg.bin[b])
fs.chmod(src, npm.modes.exec, function (er) {
if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
return cb()
}
if (er || !gtop) return cb(er)
var dest = path.resolve(binRoot, b)
, src = path.resolve(folder, pkg.bin[b])
, out = npm.config.get("parseable")
? dest + "::" + src + ":BINFILE"
: dest + " -> " + src
@@ -83,6 +83,7 @@ var mkdir = require("mkdirp")
, chmodr = require("chmodr")
, which = require("which")
, isGitUrl = require("./utils/is-git-url.js")
, pathIsInside = require("path-is-inside")

cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
@@ -286,6 +287,10 @@ function fetchAndShaCheck (u, tmp, shasum, cb) {
if (!shasum) return cb(null, response)
// validate that the url we just downloaded matches the expected shasum.
sha.check(tmp, shasum, function (er) {
if (er != null && er.message) {
// add original filename for better debuggability
er.message = er.message + '\n' + 'From: ' + u
}
return cb(er, response, shasum)
})
})
@@ -564,7 +569,7 @@ function gitEnv () {
if (gitEnv_) return gitEnv_
gitEnv_ = {}
for (var k in process.env) {
if (!~['GIT_PROXY_COMMAND','GIT_SSH'].indexOf(k) && k.match(/^GIT/)) continue
if (!~['GIT_PROXY_COMMAND','GIT_SSH','GIT_SSL_NO_VERIFY'].indexOf(k) && k.match(/^GIT/)) continue
gitEnv_[k] = process.env[k]
}
return gitEnv_
@@ -872,10 +877,10 @@ function addLocalTarball (p, name, shasum, cb_) {
if (typeof cb_ !== "function") cb_ = name, name = ""
// if it's a tar, and not in place,
// then unzip to .tmp, add the tmp folder, and clean up tmp
if (p.indexOf(npm.tmp) === 0)
if (pathIsInside(p, npm.tmp))
return addTmpTarball(p, name, shasum, cb_)

if (p.indexOf(npm.cache) === 0) {
if (pathIsInside(p, npm.cache)) {
if (path.basename(p) !== "package.tgz") return cb_(new Error(
"Not a valid cache tarball name: "+p))
return addPlacedTarball(p, name, shasum, cb_)
@@ -1117,7 +1122,7 @@ function addLocalDirectory (p, name, shasum, cb) {
if (typeof cb !== "function") cb = name, name = ""
// if it's a folder, then read the package.json,
// tar it to the proper place, and add the cache tar
if (p.indexOf(npm.cache) === 0) return cb(new Error(
if (pathIsInside(p, npm.cache)) return cb(new Error(
"Adding a cache directory to the cache will make the world implode."))
readJson(path.join(p, "package.json"), false, function (er, data) {
er = needName(er, data)
@@ -1135,8 +1140,8 @@ function addLocalDirectory (p, name, shasum, cb) {
mkdir(path.dirname(tgz), function (er, made) {
if (er) return cb(er)

var fancy = p.indexOf(npm.tmp) !== 0
&& p.indexOf(npm.cache) !== 0
var fancy = !pathIsInside(p, npm.tmp)
&& !pathIsInside(p, npm.cache)
tar.pack(tgz, p, data, fancy, function (er) {
if (er) {
log.error( "addLocalDirectory", "Could not pack %j to %j"
@@ -130,15 +130,16 @@ function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) {
// a=/path/to/node_modules/foo/node_modules/bar
// b=/path/to/node_modules/elk/node_modules/bar
// ==/path/to/node_modules/bar
a = a.split(/\/node_modules\//)
b = b.split(/\/node_modules\//)
var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep)
a = a.split(nmReg)
b = b.split(nmReg)
var name = a.pop()
b.pop()
// find the longest chain that both A and B share.
// then push the name back on it, and join by /node_modules/
var res = []
for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++);
return a.slice(0, i).concat(name).join("/node_modules/")
return a.slice(0, i).concat(name).join(path.sep + "node_modules" + path.sep)
}) : undefined

return [item[0], { item: item
@@ -192,9 +193,10 @@ function installAndRetest (set, filter, dir, unavoidable, silent, cb) {
// where is /path/to/node_modules/foo/node_modules/bar
// for package "bar", but we need it to be just
// /path/to/node_modules/foo
where = where.split(/\/node_modules\//)
var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep)
where = where.split(nmReg)
where.pop()
where = where.join("/node_modules/")
where = where.join(path.sep + "node_modules" + path.sep)
remove.push.apply(remove, others)

return npm.commands.install(where, what, cb)
@@ -1,35 +1,62 @@
module.exports = docs

docs.usage = "npm docs <pkgname>"
docs.usage = "npm docs <pkgname>"
docs.usage += "\n"
docs.usage += "npm docs ."

docs.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
registry.get("/-/short", 60000, function (er, list) {
return cb(null, list || [])
})
}

var npm = require("./npm.js")
, registry = npm.registry
, log = require("npmlog")
, opener = require("opener")
, path = require('path')
, log = require('npmlog')

function url (json) {
return json.homepage ? json.homepage : "https://npmjs.org/package/" + json.name
}

function docs (args, cb) {
if (!args.length) return cb(docs.usage)
var project = args[0]
var npmName = project.split("@").shift()
registry.get(project + "/latest", 3600, function (er, d) {
args = args || []
var pending = args.length
if (!pending) return getDoc('.', cb)
args.forEach(function(proj) {
getDoc(proj, function(err) {
if (err) return cb(err)
--pending || cb()
})
})
}

function getDoc (project, cb) {
project = project || '.'
var package = path.resolve(process.cwd(), "package.json")

if (project === '.' || project === './') {
try {
var json = require(package)
if (!json.name) throw new Error('package.json does not have a valid "name" property')
project = json.name
} catch (e) {
log.error(e.message)
return cb(docs.usage)
}

return opener(url(json), { command: npm.config.get("browser") }, cb)
}

registry.get(project + "/latest", 3600, function (er, json) {
var github = "https://github.com/" + project + "#readme"

if (er) {
if (project.split("/").length !== 2) return cb(er)

var url = "https://github.com/" + project + "#readme"
return opener(url, { command: npm.config.get("browser") }, cb)
return opener(github, { command: npm.config.get("browser") }, cb)
}

var homepage = d.homepage
, repo = d.repository || d.repositories
, url = homepage ? homepage
: "https://npmjs.org/package/" + d.name
opener(url, { command: npm.config.get("browser") }, cb)
return opener(url(json), { command: npm.config.get("browser") }, cb)
})
}
@@ -157,6 +157,8 @@ function searchFiles (args, files, cb) {
}

function formatResults (args, results, cb) {
if (!results) return cb(null)

var cols = Math.min(process.stdout.columns || Infinity, 80) + 1

var out = results.map(function (res, i, results) {
@@ -24,7 +24,7 @@ function help (args, cb) {

// npm help foo bar baz: search topics
if (args.length > 1 && args[0]) {
return npm.commands["help-search"](args, num, cb)
return npm.commands["help-search"](args, argnum, cb)
}

var section = npm.deref(args[0]) || args[0]
@@ -72,6 +72,7 @@ var npm = require("./npm.js")
, mkdir = require("mkdirp")
, lifecycle = require("./utils/lifecycle.js")
, archy = require("archy")
, isGitUrl = require("./utils/is-git-url.js")

function install (args, cb_) {
var hasArguments = !!args.length
@@ -135,6 +136,7 @@ function install (args, cb_) {
, ancestors: {}
, explicit: false
, parent: data
, root: true
, wrap: null }

if (data.name === path.basename(where) &&
@@ -171,8 +173,10 @@ function install (args, cb_) {
, ancestors: {}
, explicit: true
, parent: data
, root: true
, wrap: null }
if (data) {
if (data && data.name === path.basename(where) &&
path.basename(path.dirname(where)) === "node_modules") {
context.family[data.name] = context.ancestors[data.name] = data.version
}
var fn = npm.config.get("global") ? installMany : installManyTop
@@ -577,7 +581,9 @@ function installMany (what, where, context, cb) {
var newPrev = Object.create(context.family)
, newAnc = Object.create(context.ancestors)

newAnc[data.name] = data.version
if (!context.root) {
newAnc[data.name] = data.version
}
targets.forEach(function (t) {
newPrev[t.name] = t.version
})
@@ -626,12 +632,21 @@ function targetResolver (where, context, deps) {
// otherwise, make sure that it's a semver match with what we want.
var bd = parent.bundleDependencies
if (bd && bd.indexOf(d.name) !== -1 ||
semver.satisfies(d.version, deps[d.name] || "*", true)) {
semver.satisfies(d.version, deps[d.name] || "*", true) ||
deps[d.name] === d._resolved) {
return cb(null, d.name)
}

// something is there, but it's not satisfactory. Clobber it.
return cb(null, [])
// see if the package had been previously linked
fs.lstat(path.resolve(nm, pkg), function(err, s) {
if (err) return cb(null, [])
if (s.isSymbolicLink()) {
return cb(null, d.name)
}

// something is there, but it's not satisfactory. Clobber it.
return cb(null, [])
})
})
}, function (er, inst) {
// this is the list of things that are valid and should be ignored.
@@ -682,6 +697,12 @@ function targetResolver (where, context, deps) {
what = what + "@" + deps[what]
}

// This is where we actually fetch the package, if it's not already
// in the cache.
// If it's a git repo, then we want to install it, even if the parent
// already has a matching copy.
// If it's not a git repo, and the parent already has that pkg, then
// we can skip installing it again.
cache.add(what, function (er, data) {
if (er && parent && parent.optionalDependencies &&
parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) {
@@ -690,17 +711,24 @@ function targetResolver (where, context, deps) {
return cb(null, [])
}

var isGit = false
, maybeGit = what.split("@").slice(1).join()

if (maybeGit)
isGit = isGitUrl(url.parse(maybeGit))

if (!er &&
data &&
!context.explicit &&
context.family[data.name] === data.version &&
!npm.config.get("force")) {
!npm.config.get("force") &&
!isGit) {
log.info("already installed", data.name + "@" + data.version)
return cb(null, [])
}

if (data && !data._from) data._from = what

if (er && parent && parent.name) er.parent = parent.name
return cb(er, data || [])
})
}
@@ -1023,10 +1051,10 @@ function write (target, targetFolder, context, cb_) {
family)
var depsTargetFolder = targetFolder
var depsContext = { family: family
, ancestors: context.ancestors
, parent: target
, explicit: false
, wrap: wrap }
, ancestors: context.ancestors
, parent: target
, explicit: false
, wrap: wrap }

var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
@@ -176,7 +176,7 @@ var commandCache = {}
Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
Object.defineProperty(npm.commands, c, { get : function () {
if (!loaded) throw new Error(
"Call npm.load(conf, cb) before using this command.\n"+
"Call npm.load(config, cb) before using this command.\n"+
"See the README.md or cli.js for example usage.")
var a = npm.deref(c)
if (c === "la" || c === "ll") {
@@ -276,16 +276,16 @@ function load (npm, cli, cb) {
//console.error("about to look up configs")

var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npmconf.load(cli, builtin, function (er, config) {
if (er === config) er = null

npm.config = conf
npm.config = config

var color = conf.get("color")
var color = config.get("color")

log.level = conf.get("loglevel")
log.heading = conf.get("heading") || "npm"
log.stream = conf.get("logstream")
log.level = config.get("loglevel")
log.heading = config.get("heading") || "npm"
log.stream = config.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
@@ -313,12 +313,12 @@ function load (npm, cli, cb) {

// at this point the configs are all set.
// go ahead and spin up the registry client.
var token = conf.get("_token")
var token = config.get("_token")
if (typeof token === "string") {
try {
token = JSON.parse(token)
conf.set("_token", token, "user")
conf.save("user")
config.set("_token", token, "user")
config.save("user")
} catch (e) { token = null }
}

@@ -339,18 +339,18 @@ function load (npm, cli, cb) {
, umask: umask }

chain([ [ loadPrefix, npm, cli ]
, [ setUser, conf, conf.root ]
, [ setUser, config, config.root ]
, [ loadUid, npm ]
], cb)
})
})
}

function loadPrefix (npm, conf, cb) {
function loadPrefix (npm, config, cb) {
// try to guess at a good node_modules location.
var p
, gp
if (!Object.prototype.hasOwnProperty.call(conf, "prefix")) {
if (!Object.prototype.hasOwnProperty.call(config, "prefix")) {
p = process.cwd()
} else {
p = npm.config.get("prefix")
@@ -25,14 +25,31 @@ var path = require("path")
, asyncMap = require("slide").asyncMap
, npm = require("./npm.js")
, url = require("url")
, isGitUrl = require("./utils/is-git-url.js")
, color = require("ansicolors")
, styles = require("ansistyles")
, table = require("text-table")

function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var dir = path.resolve(npm.dir, "..")
outdated_(args, dir, {}, function (er, list) {
outdated_(args, dir, {}, 0, function (er, list) {
if (er || silent) return cb(er, list)
var outList = list.map(makePretty)
console.log(outList.join("\n"))
if (npm.config.get("json")) {
console.log(makeJSON(list))
} else {
var outList = list.map(makePretty)
var outTable = [[ styles.underline("Package")
, styles.underline("Current")
, styles.underline("Wanted")
, styles.underline("Latest")
, styles.underline("Location")
]].concat(outList)
var tableOpts = { align: ["l", "r", "r", "r", "l"]
, stringLength: function(s) { return ansiTrim(s).length }
}
console.log(table(outTable, tableOpts))
}
cb(null, list)
})
}
@@ -62,13 +79,42 @@ function makePretty (p) {
if (!npm.config.get("global")) {
dir = path.relative(process.cwd(), dir)
}
return dep + " " + dir
+ " current=" + (has || "MISSING")
+ " wanted=" + want
+ " latest=" + latest
return [ has === want ? color.yellow(dep) : color.red(dep)
, (has || "MISSING")
, color.green(want)
, color.magenta(latest)
, color.brightBlack(dirToPrettyLocation(dir))
]
}

function ansiTrim (str) {
var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" +
"\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g");
return str.replace(r, "")
}

function outdated_ (args, dir, parentHas, cb) {
function dirToPrettyLocation (dir) {
return dir.replace(/^node_modules[/\\]/, "")
.replace(/[[/\\]node_modules[/\\]/g, " > ")
}

function makeJSON (list) {
var out = {}
list.forEach(function (p) {
var dir = path.resolve(p[0], "node_modules", p[1])
if (!npm.config.get("global")) {
dir = path.relative(process.cwd(), dir)
}
out[p[1]] = { current: p[2]
, wanted: p[3]
, latest: p[4]
, location: dir
}
})
return JSON.stringify(out, null, 2)
}

function outdated_ (args, dir, parentHas, depth, cb) {
// get the deps from package.json, or {<dir/node_modules/*>:"*"}
// asyncMap over deps:
// shouldHave = cache.add(dep, req).version
@@ -77,6 +123,9 @@ function outdated_ (args, dir, parentHas, cb) {
// else if dep in args or args is empty
// return [dir, dep, has, shouldHave]

if (depth > npm.config.get("depth")) {
return cb(null, [])
}
var deps = null
readJson(path.resolve(dir, "package.json"), function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
@@ -137,12 +186,12 @@ function outdated_ (args, dir, parentHas, cb) {
// if has[dep] !== shouldHave[dep], then cb with the data
// otherwise dive into the folder
asyncMap(Object.keys(deps), function (dep, cb) {
shouldUpdate(args, dir, dep, has, deps[dep], cb)
shouldUpdate(args, dir, dep, has, deps[dep], depth, cb)
}, cb)
}
}

function shouldUpdate (args, dir, dep, has, req, cb) {
function shouldUpdate (args, dir, dep, has, req, depth, cb) {
// look up the most recent version.
// if that's what we already have, or if it's not on the args list,
// then dive into it. Otherwise, cb() with the data.
@@ -154,6 +203,7 @@ function shouldUpdate (args, dir, dep, has, req, cb) {
outdated_( args
, path.resolve(dir, "node_modules", dep)
, has
, depth + 1
, cb )
}

@@ -165,6 +215,9 @@ function shouldUpdate (args, dir, dep, has, req, cb) {
return skip()
}

if (isGitUrl(url.parse(req)))
return doIt("git", "git")

var registry = npm.registry
// search for the latest package
registry.get(dep + "/latest", function (er, l) {
@@ -13,19 +13,19 @@ var readInstalled = require("read-installed")
prune.completion = require("./utils/completion/installed-deep.js")

function prune (args, cb) {
//check if is a valid package.json file
var jsonFile = path.resolve(npm.dir, "..", "package.json" )
readJson(jsonFile, log.warn, function (er, packageData) {
readJson(jsonFile, log.warn, function (er, data) {
if (er) return cb(er)
next()
})

function next() {
readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) {
if (er) return cb(er)
if (npm.config.get("production")) {
Object.keys(packageData.devDependencies || {}).forEach(function (k) {
if (data.dependencies[k]) data.dependencies[k].extraneous = true
})
}
prune_(args, data, cb)
})
})
}
}

function prune_ (args, data, cb) {
@@ -16,22 +16,39 @@ var npm = require("./npm.js")
, opener = require("opener")
, github = require('github-url-from-git')
, githubUserRepo = require("github-url-from-username-repo")
, path = require("path")
, readJson = require("read-package-json")
, fs = require("fs")

function repo (args, cb) {
if (!args.length) return cb(repo.usage)
var n = args[0].split("@").shift()
var n = args.length && args[0].split("@").shift() || '.'
fs.stat(n, function (er, s) {
if (er && er.code === "ENOENT") return callRegistry(n, cb)
else if (er) return cb(er)
if (!s.isDirectory()) return callRegistry(n, cb)
readJson(path.resolve(n, "package.json"), function (er, d) {
if (er) return cb(er)
getUrlAndOpen(d, cb)
})
})
}

function getUrlAndOpen (d, cb) {
var r = d.repository;
if (!r) return cb(new Error('no repository'));
// XXX remove this when npm@v1.3.10 from node 0.10 is deprecated
// from https://github.com/isaacs/npm-www/issues/418
if (githubUserRepo(r.url))
r.url = githubUserRepo(r.url)
var url = github(r.url)
if (!url)
return cb(new Error('no repository: could not get url'))
opener(url, { command: npm.config.get("browser") }, cb)
}

function callRegistry (n, cb) {
registry.get(n + "/latest", 3600, function (er, d) {
if (er) return cb(er)
var r = d.repository;
if (!r) return cb(new Error('no repository'));
// XXX remove this when npm@v1.3.10 from node 0.10 is deprecated
// from https://github.com/isaacs/npm-www/issues/418
if (githubUserRepo(r.url))
r.url = githubUserRepo(r.url)

var url = github(r.url)
if (!url)
return cb(new Error('no repository: could not get url'))
opener(url, { command: npm.config.get("browser") }, cb)
getUrlAndOpen(d, cb)
})
}
@@ -3,6 +3,7 @@ module.exports = exports = search

var npm = require("./npm.js")
, registry = npm.registry
, columnify = require('columnify')

search.usage = "npm search [some search terms ...]"

@@ -91,7 +92,8 @@ function stripData (data) {
&& (new Date(data.time.modified).toISOString()
.split("T").join(" ")
.replace(/:[0-9]{2}\.[0-9]{3}Z$/, ""))
|| "(prehistoric)"
.slice(0, -5) // remove time
|| "prehistoric"
}
}

@@ -129,102 +131,77 @@ function match (words, arg) {
}

function prettify (data, args) {
try {
var tty = require("tty")
, stdout = process.stdout
, cols = !tty.isatty(stdout.fd) ? Infinity
: process.stdout.getWindowSize()[0]
cols = (cols == 0) ? Infinity : cols
} catch (ex) { cols = Infinity }

// name, desc, author, keywords
var longest = []
, spaces
, maxLen = npm.config.get("description")
? [20, 60, 20, 20, 10, Infinity]
: [20, 20, 20, 10, Infinity]
, headings = npm.config.get("description")
? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "VERSION", "KEYWORDS"]
: ["NAME", "AUTHOR", "DATE", "VERSION", "KEYWORDS"]
, lines
, searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase()
, sortFields = { name: 0
, description: 1
, author: 2
, date: 3
, version: 4
, keywords: 5 }
var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase()
, sortField = searchsort.replace(/^\-+/, "")
, searchRev = searchsort.charAt(0) === "-"
, sortField = sortFields[searchsort.replace(/^\-+/, "")]
, truncate = !npm.config.get("long")

if (Object.keys(data).length === 0) {
return "No match found for "+(args.map(JSON.stringify).join(" "))
}

lines = Object.keys(data).map(function (d) {
var lines = Object.keys(data).map(function (d) {
// strip keyname
return data[d]
}).map(function (data) {
// turn a pkg data into a string
// [name,who,desc,targets,keywords] tuple
// also set longest to the longest name
if (typeof data.keywords === "string") {
data.keywords = data.keywords.split(/[,\s]+/)
}).map(function(dat) {
dat.author = dat.maintainers
delete dat.maintainers
dat.date = dat.time
delete dat.time
return dat
}).map(function(dat) {
// split keywords on whitespace or ,
if (typeof dat.keywords === "string") {
dat.keywords = dat.keywords.split(/[,\s]+/)
}
if (!Array.isArray(data.keywords)) data.keywords = []
var l = [ data.name
, data.description || ""
, data.maintainers.join(" ")
, data.time
, data.version || ""
, (data.keywords || []).join(" ")
]
l.forEach(function (s, i) {
var len = s.length
longest[i] = Math.min(maxLen[i] || Infinity
,Math.max(longest[i] || 0, len))
if (len > longest[i]) {
l._undent = l._undent || []
l._undent[i] = len - longest[i]
}
l[i] = ('' + l[i]).replace(/\s+/g, " ")
})
return l
}).sort(function (a, b) {
// a and b are "line" objects of [name, desc, maint, time, kw]
if (Array.isArray(dat.keywords)) {
dat.keywords = dat.keywords.join(' ')
}

// split author on whitespace or ,
if (typeof dat.author === "string") {
dat.author = dat.author.split(/[,\s]+/)
}
if (Array.isArray(dat.author)) {
dat.author = dat.author.join(' ')
}
return dat
})

lines.sort(function(a, b) {
var aa = a[sortField].toLowerCase()
, bb = b[sortField].toLowerCase()
return aa === bb ? 0
: aa < bb ? (searchRev ? 1 : -1)
: (searchRev ? -1 : 1)
}).map(function (line) {
return line.map(function (s, i) {
spaces = spaces || longest.map(function (n) {
return new Array(n + 2).join(" ")
})
var len = s.length
if (line._undent && line._undent[i - 1]) {
len += line._undent[i - 1] - 1
}
return s + spaces[i].substr(len)
}).join(" ").substr(0, cols).trim()
}).map(function (line) {
// colorize!
args.forEach(function (arg, i) {
line = addColorMarker(line, arg, i)
})
return colorize(line).trim()
: aa < bb ? -1 : 1
})

if (lines.length === 0) {
return "No match found for "+(args.map(JSON.stringify).join(" "))
}
if (searchRev) lines.reverse()

// build the heading padded to the longest in each field
return headings.map(function (h, i) {
var space = Math.max(2, 3 + (longest[i] || 0) - h.length)
return h + (new Array(space).join(" "))
}).join("").substr(0, cols).trim() + "\n" + lines.join("\n")
var columns = npm.config.get("description")
? ["name", "description", "author", "date", "version", "keywords"]
: ["name", "author", "date", "version", "keywords"]

var output = columnify(lines, {
include: columns
, truncate: truncate
, config: {
name: { maxWidth: 40, truncate: false, truncateMarker: '' }
, description: { maxWidth: 60 }
, author: { maxWidth: 20 }
, date: { maxWidth: 11 }
, version: { maxWidth: 11 }
, keywords: { maxWidth: Infinity }
}
})
output = trimToMaxWidth(output)
output = highlightSearchTerms(output, args)

return output
}

var colors = [31, 33, 32, 36, 34, 35 ]
, cl = colors.length

function addColorMarker (str, arg, i) {
var m = i % cl + 1
, markStart = String.fromCharCode(m)
@@ -260,3 +237,29 @@ function colorize (line) {
var uncolor = npm.color ? "\033[0m" : ""
return line.split("\u0000").join(uncolor)
}

function getMaxWidth() {
try {
var tty = require("tty")
, stdout = process.stdout
, cols = !tty.isatty(stdout.fd) ? Infinity
: process.stdout.getWindowSize()[0]
cols = (cols == 0) ? Infinity : cols
} catch (ex) { cols = Infinity }
return cols
}

function trimToMaxWidth(str) {
var maxWidth = getMaxWidth()
return str.split('\n').map(function(line) {
return line.slice(0, maxWidth)
}).join('\n')
}

function highlightSearchTerms(str, terms) {
terms.forEach(function (arg, i) {
str = addColorMarker(str, arg, i)
})

return colorize(str).trim()
}
@@ -32,7 +32,7 @@ function update (args, cb) {
, dep = ww[1]
, want = ww[3]
, what = dep + "@" + want
, req = ww[4]
, req = ww[5]
, url = require('url')

// use the initial installation method (repo, tar, git) for updating
@@ -149,6 +149,9 @@ function errorHandler (er) {
if (er.pkgid && er.pkgid !== "-") {
var msg = ["'"+er.pkgid+"' is not in the npm registry."
,"You should bug the author to publish it"]
if (er.parent) {
msg.push("It was specified as a dependency of '"+er.parent+"'")
}
if (er.pkgid.match(/^node[\.\-]|[\.\-]js$/)) {
var s = er.pkgid.replace(/^node[\.\-]|[\.\-]js$/g, "")
if (s !== er.pkgid) {
@@ -265,10 +268,9 @@ function errorHandler (er) {

default:
log.error("", er.stack || er.message || er)
log.error("", ["If you need help, you may report this log at:"
log.error("", ["If you need help, you may report this *entire* log,"
,"including the npm and node versions, at:"
," <http://github.com/isaacs/npm/issues>"
,"or email it to:"
," <npm-@googlegroups.com>"
].join("\n"))
printStack = false
break
@@ -31,7 +31,7 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) {
if (!pkg) return cb(new Error("Invalid package data"))

log.info(stage, pkg._id)
if (!pkg.scripts) pkg.scripts = {}
if (!pkg.scripts || npm.config.get('ignore-scripts')) pkg.scripts = {}

validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) {
if (er) return cb(er)
@@ -185,14 +185,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
process.nextTick(dequeue)
}

var sh = "sh"
var shFlag = "-c"

if (process.platform === "win32") {
sh = "cmd"
shFlag = "/c"
}

var conf = { cwd: wd
, env: env
, stdio: [ 0, 1, 2 ]
@@ -203,6 +195,15 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
conf.gid = gid ^ 0
}

var sh = "sh"
var shFlag = "-c"

if (process.platform === "win32") {
sh = "cmd"
shFlag = "/c"
conf.windowsVerbatimArguments = true
}

var proc = spawn(sh, [shFlag, cmd], conf)
proc.on("close", function (code, signal) {
if (signal) {
@@ -65,7 +65,8 @@ function version (args, silent, cb_) {
cb_(er)
}

var doGit = !er && s.isDirectory()
var tags = npm.config.get('git-tag-version')
var doGit = !er && s.isDirectory() && tags
if (!doGit) return write(data, cb)
else checkGit(data, cb)
})
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM" "1" "November 2013" "" ""
.TH "NPM" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-ADDUSER" "1" "November 2013" "" ""
.TH "NPM\-ADDUSER" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
@@ -25,7 +25,7 @@ You may use this command to change your email address, but not username
or password\.
.
.P
To reset your password, go to \fIhttp://admin\.npmjs\.org/\fR
To reset your password, go to \fIhttps://npmjs\.org/forgot\fR
.
.P
You may use this command multiple times with the same user account to
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BIN" "1" "November 2013" "" ""
.TH "NPM\-BIN" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BUGS" "1" "November 2013" "" ""
.TH "NPM\-BUGS" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
@@ -10,13 +10,15 @@
.
.nf
npm bugs <pkgname>
npm bugs (with no args in a package dir)
.
.fi
.
.SH "DESCRIPTION"
This command tries to guess at the likely location of a package\'s
bug tracker URL, and then tries to open it using the \fB\-\-browser\fR
config param\.
config param\. If no package name is provided, it will search for
a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\.
.
.SH "CONFIGURATION"
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BUILD" "1" "November 2013" "" ""
.TH "NPM\-BUILD" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BUNDLE" "1" "November 2013" "" ""
.TH "NPM\-BUNDLE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-CACHE" "1" "November 2013" "" ""
.TH "NPM\-CACHE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-COMPLETION" "1" "November 2013" "" ""
.TH "NPM\-COMPLETION" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-CONFIG" "1" "November 2013" "" ""
.TH "NPM\-CONFIG" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-DEDUPE" "1" "November 2013" "" ""
.TH "NPM\-DEDUPE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-dedupe\fR \-\- Reduce duplication
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-DEPRECATE" "1" "November 2013" "" ""
.TH "NPM\-DEPRECATE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
@@ -1,23 +1,27 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-DOCS" "1" "November 2013" "" ""
.TH "NPM\-DOCS" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.
.SH "SYNOPSIS"
.
.nf
npm docs <pkgname>
npm home <pkgname>
npm docs [<pkgname> [<pkgname> \.\.\.]]
npm docs (with no args in a package dir)
npm home [<pkgname> [<pkgname> \.\.\.]]
npm home (with no args in a package dir)
.
.fi
.
.SH "DESCRIPTION"
This command tries to guess at the likely location of a package\'s
documentation URL, and then tries to open it using the \fB\-\-browser\fR
config param\.
config param\. You can pass multiple package names at once\. If no
package name is provided, it will search for a \fBpackage\.json\fR in
the current folder and use the \fBname\fR property\.
.
.SH "CONFIGURATION"
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-EDIT" "1" "November 2013" "" ""
.TH "NPM\-EDIT" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-EXPLORE" "1" "November 2013" "" ""
.TH "NPM\-EXPLORE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-HELP\-SEARCH" "1" "November 2013" "" ""
.TH "NPM\-HELP\-SEARCH" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-HELP" "1" "November 2013" "" ""
.TH "NPM\-HELP" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-INIT" "1" "November 2013" "" ""
.TH "NPM\-INIT" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-INSTALL" "1" "November 2013" "" ""
.TH "NPM\-INSTALL" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
@@ -299,6 +299,10 @@ The \fB\-\-no\-bin\-links\fR argument will prevent npm from creating symlinks fo
any binaries the package might contain\.
.
.P
The \fB\-\-no\-optional\fR argument will prevent optional dependencies from
being installed\.
.
.P
The \fB\-\-no\-shrinkwrap\fR argument, which will ignore an available
shrinkwrap file and use the package\.json instead\.
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-LINK" "1" "November 2013" "" ""
.TH "NPM\-LINK" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-LS" "1" "November 2013" "" ""
.TH "NPM\-LS" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
@@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show:
.IP "" 4
.
.nf
npm@1.3.15 /path/to/npm
npm@1.3.25 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-OUTDATED" "1" "November 2013" "" ""
.TH "NPM\-OUTDATED" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-OWNER" "1" "November 2013" "" ""
.TH "NPM\-OWNER" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PACK" "1" "November 2013" "" ""
.TH "NPM\-PACK" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PREFIX" "1" "November 2013" "" ""
.TH "NPM\-PREFIX" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PRUNE" "1" "November 2013" "" ""
.TH "NPM\-PRUNE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PUBLISH" "1" "November 2013" "" ""
.TH "NPM\-PUBLISH" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-REBUILD" "1" "November 2013" "" ""
.TH "NPM\-REBUILD" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-REPO" "1" "November 2013" "" ""
.TH "NPM\-REPO" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-repo\fR \-\- Open package repository page in the browser
@@ -10,13 +10,15 @@
.
.nf
npm repo <pkgname>
npm repo (with no args in a package dir)
.
.fi
.
.SH "DESCRIPTION"
This command tries to guess at the likely location of a package\'s
repository URL, and then tries to open it using the \fB\-\-browser\fR
config param\.
config param\. If no package name is provided, it will search for
a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\.
.
.SH "CONFIGURATION"
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RESTART" "1" "November 2013" "" ""
.TH "NPM\-RESTART" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RM" "1" "November 2013" "" ""
.TH "NPM\-RM" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-ROOT" "1" "November 2013" "" ""
.TH "NPM\-ROOT" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RUN\-SCRIPT" "1" "November 2013" "" ""
.TH "NPM\-RUN\-SCRIPT" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
@@ -1,15 +1,15 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SEARCH" "1" "November 2013" "" ""
.TH "NPM\-SEARCH" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.
.SH "SYNOPSIS"
.
.nf
npm search [search terms \.\.\.]
npm search [\-\-long] [search terms \.\.\.]
npm s [search terms \.\.\.]
npm se [search terms \.\.\.]
.
@@ -23,6 +23,24 @@ If a term starts with \fB/\fR, then it\'s interpreted as a regular expression\.
A trailing \fB/\fR will be ignored in this case\. (Note that many regular
expression characters must be escaped or quoted in most shells\.)
.
.SH "CONFIGURATION"
.
.SS "long"
.
.IP "\(bu" 4
Default: false
.
.IP "\(bu" 4
Type: Boolean
.
.IP "" 0
.
.P
Display full package descriptions and other long text across multiple
lines\. When disabled (default) search results are truncated to fit
neatly on a single line\. Modules with extremely long names will
fall on multiple lines\.
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SHRINKWRAP" "1" "November 2013" "" ""
.TH "NPM\-SHRINKWRAP" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- Lock down dependency versions
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-STAR" "1" "November 2013" "" ""
.TH "NPM\-STAR" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-STARS" "1" "November 2013" "" ""
.TH "NPM\-STARS" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-stars\fR \-\- View packages marked as favorites
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-START" "1" "November 2013" "" ""
.TH "NPM\-START" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-STOP" "1" "November 2013" "" ""
.TH "NPM\-STOP" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SUBMODULE" "1" "November 2013" "" ""
.TH "NPM\-SUBMODULE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-TAG" "1" "November 2013" "" ""
.TH "NPM\-TAG" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-TEST" "1" "November 2013" "" ""
.TH "NPM\-TEST" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RM" "1" "November 2013" "" ""
.TH "NPM\-RM" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-UNPUBLISH" "1" "November 2013" "" ""
.TH "NPM\-UNPUBLISH" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-UPDATE" "1" "November 2013" "" ""
.TH "NPM\-UPDATE" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
@@ -1,15 +1,15 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-VERSION" "1" "November 2013" "" ""
.TH "NPM\-VERSION" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.
.SH "SYNOPSIS"
.
.nf
npm version [<newversion> | major | minor | patch | build]
npm version [<newversion> | major | minor | patch]
.
.fi
.
@@ -19,7 +19,7 @@ data back to the package\.json file\.
.
.P
The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a valid
second argument to semver\.inc (one of "build", "patch", "minor", or
second argument to semver\.inc (one of "patch", "minor", or
"major")\. In the second case, the existing version will be incremented
by 1 in the specified field\.
.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-VIEW" "1" "November 2013" "" ""
.TH "NPM\-VIEW" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-WHOAMI" "1" "November 2013" "" ""
.TH "NPM\-WHOAMI" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM" "1" "November 2013" "" ""
.TH "NPM" "1" "January 2014" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
@@ -14,7 +14,7 @@ npm <command> [args]
.fi
.
.SH "VERSION"
1.3.15
1.3.25
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BIN" "3" "November 2013" "" ""
.TH "NPM\-BIN" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-BUGS" "3" "November 2013" "" ""
.TH "NPM\-BUGS" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-COMMANDS" "3" "November 2013" "" ""
.TH "NPM\-COMMANDS" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-CONFIG" "3" "November 2013" "" ""
.TH "NPM\-CONFIG" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-DEPRECATE" "3" "November 2013" "" ""
.TH "NPM\-DEPRECATE" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-DOCS" "3" "November 2013" "" ""
.TH "NPM\-DOCS" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-EDIT" "3" "November 2013" "" ""
.TH "NPM\-EDIT" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-EXPLORE" "3" "November 2013" "" ""
.TH "NPM\-EXPLORE" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-HELP\-SEARCH" "3" "November 2013" "" ""
.TH "NPM\-HELP\-SEARCH" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "INIT" "3" "November 2013" "" ""
.TH "INIT" "3" "January 2014" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-INSTALL" "3" "November 2013" "" ""
.TH "NPM\-INSTALL" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-LINK" "3" "November 2013" "" ""
.TH "NPM\-LINK" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-LOAD" "3" "November 2013" "" ""
.TH "NPM\-LOAD" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-LS" "3" "November 2013" "" ""
.TH "NPM\-LS" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-OUTDATED" "3" "November 2013" "" ""
.TH "NPM\-OUTDATED" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-OWNER" "3" "November 2013" "" ""
.TH "NPM\-OWNER" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PACK" "3" "November 2013" "" ""
.TH "NPM\-PACK" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PREFIX" "3" "November 2013" "" ""
.TH "NPM\-PREFIX" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PRUNE" "3" "November 2013" "" ""
.TH "NPM\-PRUNE" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-PUBLISH" "3" "November 2013" "" ""
.TH "NPM\-PUBLISH" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-REBUILD" "3" "November 2013" "" ""
.TH "NPM\-REBUILD" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-REPO" "3" "November 2013" "" ""
.TH "NPM\-REPO" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-repo\fR \-\- Open package repository page in the browser
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RESTART" "3" "November 2013" "" ""
.TH "NPM\-RESTART" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-ROOT" "3" "November 2013" "" ""
.TH "NPM\-ROOT" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-RUN\-SCRIPT" "3" "November 2013" "" ""
.TH "NPM\-RUN\-SCRIPT" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SEARCH" "3" "November 2013" "" ""
.TH "NPM\-SEARCH" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SHRINKWRAP" "3" "November 2013" "" ""
.TH "NPM\-SHRINKWRAP" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- programmatically generate package shrinkwrap file
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-START" "3" "November 2013" "" ""
.TH "NPM\-START" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-STOP" "3" "November 2013" "" ""
.TH "NPM\-STOP" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-SUBMODULE" "3" "November 2013" "" ""
.TH "NPM\-SUBMODULE" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-TAG" "3" "November 2013" "" ""
.TH "NPM\-TAG" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-TEST" "3" "November 2013" "" ""
.TH "NPM\-TEST" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-UNINSTALL" "3" "November 2013" "" ""
.TH "NPM\-UNINSTALL" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-UNPUBLISH" "3" "November 2013" "" ""
.TH "NPM\-UNPUBLISH" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-UPDATE" "3" "November 2013" "" ""
.TH "NPM\-UPDATE" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-VERSION" "3" "November 2013" "" ""
.TH "NPM\-VERSION" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-VIEW" "3" "November 2013" "" ""
.TH "NPM\-VIEW" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-WHOAMI" "3" "November 2013" "" ""
.TH "NPM\-WHOAMI" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM" "3" "November 2013" "" ""
.TH "NPM" "3" "January 2014" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
@@ -21,7 +21,7 @@ npm\.load([configObject], function (er, npm) {
.fi
.
.SH "VERSION"
1.3.15
1.3.25
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-FOLDERS" "5" "November 2013" "" ""
.TH "NPM\-FOLDERS" "5" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-FOLDERS" "5" "November 2013" "" ""
.TH "NPM\-FOLDERS" "5" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "PACKAGE\.JSON" "5" "November 2013" "" ""
.TH "PACKAGE\.JSON" "5" "January 2014" "" ""
.
.SH "NAME"
\fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
@@ -14,41 +14,6 @@ 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
npm help settings described in \fBnpm\-config\fR\|\.
.
.SH "DEFAULT VALUES"
npm will default some values based on package contents\.
.
.IP "\(bu" 4
\fB"scripts": {"start": "node server\.js"}\fR
.
.IP
If there is a \fBserver\.js\fR file in the root of your package, then npm
will default the \fBstart\fR command to \fBnode server\.js\fR\|\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-waf clean || true; node\-waf configure build"}\fR
.
.IP
If there is a \fBwscript\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-waf\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR
.
.IP
If there is a \fBbinding\.gyp\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-gyp\.
.
.IP "\(bu" 4
\fB"contributors": [\.\.\.]\fR
.
.IP
If there is an \fBAUTHORS\fR file in the root of your package, npm will
treat each line as a \fBName <email> (url)\fR format, where email and url
are optional\. Lines which start with a \fB#\fR or are blank, will be
ignored\.
.
.IP "" 0
.
.SH "name"
The \fImost\fR important things in your package\.json are the name and version fields\.
Those are actually required, and your package won\'t install without
@@ -143,37 +108,26 @@ You should specify a license for your package so that people know how they are
permitted to use it, and any restrictions you\'re placing on it\.
.
.P
The simplest way, assuming you\'re using a common license such as BSD or MIT, is
to just specify the name of the license you\'re using, like this:
The simplest way, assuming you\'re using a common license such as BSD\-3\-Clause
or MIT, is to just specify the standard SPDX ID of the license you\'re using,
like this:
.
.IP "" 4
.
.nf
{ "license" : "BSD" }
{ "license" : "BSD\-3\-Clause" }
.
.fi
.
.IP "" 0
.
.P
If you have more complex licensing terms, or you want to provide more detail
in your package\.json file, you can use the more verbose plural form, like this:
.
.IP "" 4
.
.nf
"licenses" : [
{ "type" : "MyLicense"
, "url" : "http://github\.com/owner/project/path/to/license"
}
]
.
.fi
.
.IP "" 0
You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\.
Ideally you should pick one that is OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\.
.
.P
It\'s also a good idea to include a license file at the top level in your package\.
It\'s also a good idea to include a LICENSE file at the top level in
your package\.
.
.SH "people fields: author, contributors"
The "author" is one person\. "contributors" is an array of people\. A "person"
@@ -789,6 +743,34 @@ Any config values can be overridden, but of course only "tag" and
npm help See \fBnpm\-config\fR to see the list of config options that can be
overridden\.
.
.SH "DEFAULT VALUES"
npm will default some values based on package contents\.
.
.IP "\(bu" 4
\fB"scripts": {"start": "node server\.js"}\fR
.
.IP
If there is a \fBserver\.js\fR file in the root of your package, then npm
will default the \fBstart\fR command to \fBnode server\.js\fR\|\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR
.
.IP
If there is a \fBbinding\.gyp\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-gyp\.
.
.IP "\(bu" 4
\fB"contributors": [\.\.\.]\fR
.
.IP
If there is an \fBAUTHORS\fR file in the root of your package, npm will
treat each line as a \fBName <email> (url)\fR format, where email and url
are optional\. Lines which start with a \fB#\fR or are blank, will be
ignored\.
.
.IP "" 0
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPMRC" "5" "November 2013" "" ""
.TH "NPMRC" "5" "January 2014" "" ""
.
.SH "NAME"
\fBnpmrc\fR \-\- The npm config files
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "PACKAGE\.JSON" "5" "November 2013" "" ""
.TH "PACKAGE\.JSON" "5" "January 2014" "" ""
.
.SH "NAME"
\fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling
@@ -14,41 +14,6 @@ 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
npm help settings described in \fBnpm\-config\fR\|\.
.
.SH "DEFAULT VALUES"
npm will default some values based on package contents\.
.
.IP "\(bu" 4
\fB"scripts": {"start": "node server\.js"}\fR
.
.IP
If there is a \fBserver\.js\fR file in the root of your package, then npm
will default the \fBstart\fR command to \fBnode server\.js\fR\|\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-waf clean || true; node\-waf configure build"}\fR
.
.IP
If there is a \fBwscript\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-waf\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR
.
.IP
If there is a \fBbinding\.gyp\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-gyp\.
.
.IP "\(bu" 4
\fB"contributors": [\.\.\.]\fR
.
.IP
If there is an \fBAUTHORS\fR file in the root of your package, npm will
treat each line as a \fBName <email> (url)\fR format, where email and url
are optional\. Lines which start with a \fB#\fR or are blank, will be
ignored\.
.
.IP "" 0
.
.SH "name"
The \fImost\fR important things in your package\.json are the name and version fields\.
Those are actually required, and your package won\'t install without
@@ -143,37 +108,26 @@ You should specify a license for your package so that people know how they are
permitted to use it, and any restrictions you\'re placing on it\.
.
.P
The simplest way, assuming you\'re using a common license such as BSD or MIT, is
to just specify the name of the license you\'re using, like this:
The simplest way, assuming you\'re using a common license such as BSD\-3\-Clause
or MIT, is to just specify the standard SPDX ID of the license you\'re using,
like this:
.
.IP "" 4
.
.nf
{ "license" : "BSD" }
{ "license" : "BSD\-3\-Clause" }
.
.fi
.
.IP "" 0
.
.P
If you have more complex licensing terms, or you want to provide more detail
in your package\.json file, you can use the more verbose plural form, like this:
.
.IP "" 4
.
.nf
"licenses" : [
{ "type" : "MyLicense"
, "url" : "http://github\.com/owner/project/path/to/license"
}
]
.
.fi
.
.IP "" 0
You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\.
Ideally you should pick one that is OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\.
.
.P
It\'s also a good idea to include a license file at the top level in your package\.
It\'s also a good idea to include a LICENSE file at the top level in
your package\.
.
.SH "people fields: author, contributors"
The "author" is one person\. "contributors" is an array of people\. A "person"
@@ -789,6 +743,34 @@ Any config values can be overridden, but of course only "tag" and
npm help See \fBnpm\-config\fR to see the list of config options that can be
overridden\.
.
.SH "DEFAULT VALUES"
npm will default some values based on package contents\.
.
.IP "\(bu" 4
\fB"scripts": {"start": "node server\.js"}\fR
.
.IP
If there is a \fBserver\.js\fR file in the root of your package, then npm
will default the \fBstart\fR command to \fBnode server\.js\fR\|\.
.
.IP "\(bu" 4
\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fR
.
.IP
If there is a \fBbinding\.gyp\fR file in the root of your package, npm will
default the \fBpreinstall\fR command to compile using node\-gyp\.
.
.IP "\(bu" 4
\fB"contributors": [\.\.\.]\fR
.
.IP
If there is an \fBAUTHORS\fR file in the root of your package, npm will
treat each line as a \fBName <email> (url)\fR format, where email and url
are optional\. Lines which start with a \fB#\fR or are blank, will be
ignored\.
.
.IP "" 0
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NPM\-CODING\-STYLE" "7" "November 2013" "" ""
.TH "NPM\-CODING\-STYLE" "7" "January 2014" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style