diff options
author | isaacs <i@izs.me> | 2010-09-22 03:25:47 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-09-22 03:25:47 +0400 |
commit | dbee5c3b14f10fac8b15e661a8e5ed72d4e147c0 (patch) | |
tree | ec68a7ff9638901db2379e9bc20fca56143d5945 /man | |
parent | f9071cfbfd5b3316d9f4f18e06e75358bb757703 (diff) |
Change the way npm help works, so that it will work with man programs that stubbornly refuse to take a troff file as an argument
That is, make it work on Solaris.
Diffstat (limited to 'man')
-rw-r--r-- | man/activate.1 | 20 | ||||
-rw-r--r-- | man/adduser.1 | 32 | ||||
-rw-r--r-- | man/build.1 | 46 | ||||
-rw-r--r-- | man/bundle.1 | 125 | ||||
-rw-r--r-- | man/cache.1 | 70 | ||||
-rw-r--r-- | man/coding-style.1 | 212 | ||||
-rw-r--r-- | man/config.1 | 284 | ||||
-rw-r--r-- | man/deactivate.1 | 21 | ||||
-rw-r--r-- | man/developers.1 | 224 | ||||
-rw-r--r-- | man/folders.1 | 59 | ||||
-rw-r--r-- | man/future-ideas/deploy.1 | 49 | ||||
-rw-r--r-- | man/future-ideas/remote.1 | 28 | ||||
-rw-r--r-- | man/future-ideas/site.1 | 79 | ||||
-rw-r--r-- | man/help.1 | 147 | ||||
-rw-r--r-- | man/install.1 | 140 | ||||
-rw-r--r-- | man/json.1 | 469 | ||||
-rw-r--r-- | man/link.1 | 20 | ||||
-rw-r--r-- | man/list.1 | 52 | ||||
-rw-r--r-- | man/ln.1 | 20 | ||||
-rw-r--r-- | man/ls.1 | 52 | ||||
-rw-r--r-- | man/npm.1 | 415 | ||||
-rw-r--r-- | man/owner.1 | 40 | ||||
-rw-r--r-- | man/publish.1 | 33 | ||||
-rw-r--r-- | man/rebuild.1 | 34 | ||||
-rw-r--r-- | man/restart.1 | 33 | ||||
-rw-r--r-- | man/rm.1 | 39 | ||||
-rw-r--r-- | man/scripts.1 | 191 | ||||
-rw-r--r-- | man/start.1 | 20 | ||||
-rw-r--r-- | man/stop.1 | 20 | ||||
-rw-r--r-- | man/tag.1 | 23 | ||||
-rw-r--r-- | man/test.1 | 20 | ||||
-rw-r--r-- | man/uninstall.1 | 39 | ||||
-rw-r--r-- | man/unpublish.1 | 22 | ||||
-rw-r--r-- | man/update.1 | 33 | ||||
-rw-r--r-- | man/view.1 | 22 |
35 files changed, 0 insertions, 3133 deletions
diff --git a/man/activate.1 b/man/activate.1 deleted file mode 100644 index 3c603a243..000000000 --- a/man/activate.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "ACTIVATE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBactivate\fR \-\- Activate an installed version of a package -. -.SH "SYNOPSIS" -. -.nf -npm activate <name>@<version> [<name>@<version> \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This "activates" a specific version of a package, so that you can just do \fBrequire("foo")\fR without having to specify the version\. -. -.SH "SEE ALSO" -npm\-deactivate(1) diff --git a/man/adduser.1 b/man/adduser.1 deleted file mode 100644 index 1ffb57d2a..000000000 --- a/man/adduser.1 +++ /dev/null @@ -1,32 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-ADDUSER" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-adduser\fR \-\- Add a registry user account -. -.SH "SYNOPSIS" -. -.nf -npm adduser -. -.fi -. -.SH "DESCRIPTION" -Create or verify a user named \fB<username>\fR in the npm registry, and -save the credentials to the \fB\|\.npmrc\fR file\. -. -.P -The username, password, and email are read in from prompts\. This command -cannot be scripted\. If you think you need to script the creation of new -users, or the authorization of existing ones, without human intervention, -please rethink your use case\. That\'s a very bad idea\. -. -.P -You may use this command to change your email address, but not username -or password\. -. -.P -You may use this command multiple times with the same user account to -authorize on a new machine\. diff --git a/man/build.1 b/man/build.1 deleted file mode 100644 index 501b3db77..000000000 --- a/man/build.1 +++ /dev/null @@ -1,46 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-BUILD" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-build\fR \-\- Build a package -. -.SH "SYNOPSIS" -. -.nf -npm build <package\-folder> -. -.fi -. -.IP "\(bu" 4 -\fB<package\-folder>\fR: -A folder containing a \fBpackage\.json\fR file in its root\. -. -.IP "" 0 -. -.SH "DESCRIPTION" -This command should almost never need to be run directly\. It is an abstraction -of the functionality shared by both npm\-install(1) and npm\-link(1)\. -. -.P -This command creates the various interwoven links that ensure a package\'s contents -are available in the root appropriately, and that its dependencies are linked -appropriately\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm\-install(1) -. -.IP "\(bu" 4 -npm\-link(1) -. -.IP "\(bu" 4 -npm\-scripts(1) -. -.IP "\(bu" 4 -npm\-json(1) -. -.IP "" 0 - diff --git a/man/bundle.1 b/man/bundle.1 deleted file mode 100644 index aad43dfad..000000000 --- a/man/bundle.1 +++ /dev/null @@ -1,125 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-BUNDLE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-bundle\fR \-\- Bundle package dependencies -. -.SH "EXPERIMENTAL" -This is experimental functionality\. If you have thoughts about how it -should work, please post a comment at: -http://github\.com/isaacs/npm/issues/issue/74 -. -.SH "SYNOPSIS" -. -.nf -npm bundle <folder> [<pkg>] -. -.fi -. -.IP "\(bu" 4 -\fB<folder>\fR: -The place where bundled dependencies go\. -. -.IP "\(bu" 4 -\fB<pkg>\fR: -The package whose dependencies are to be bundled\. Defaults to $PWD\. -See \fBnpm help install\fR for more on the ways to identify a package\. -. -.IP "" 0 -. -.SH "DESCRIPTION" -Bundles all the dependencies of a package into a specific folder\. -. -.P -Furthermore, sets up an index\.js in the folder that will shift it onto the -require\.paths, and export the bundled modules\. -. -.P -For example, to install of your requirements into a "deps" folder, -you could do this: -. -.IP "" 4 -. -.nf -npm bundle deps -. -.fi -. -.IP "" 0 -. -.P -Assuming your code is in the "lib" folder, and it depended on a package -"foo", you could then do this: -. -.IP "" 4 -. -.nf -require("\.\./deps") // this sets the require\.paths properly\. -var foo = require("foo") -. -.fi -. -.IP "" 0 -. -.P -The bundle index will also return the modules that your package -depends on\. So, this would work as well: -. -.IP "" 4 -. -.nf -require("\.\./deps")\.foo\.createFoo(\.\.\.) -. -.fi -. -.IP "" 0 -. -.P -The dependencies of those packages installed will also be installed and -linked, just like an \fBnpm install\fR command\. In fact, internally \fBbuffer\fR -just sets the \fBroot\fR config and then does a normal \fBnpm install\fR to put -the modules in place\. -. -.P -To update to new versions (or if the dependencies change) then run the -bundle command again\. -. -.SH "CAVEATS" -There is no pretty to "remove" a package from a bundle at the moment\. -However, you can do this: -. -.IP "" 4 -. -.nf -npm \-\-root \./deps rm foo -. -.fi -. -.IP "" 0 -. -.P -Bins and man pages are not installed by bundle\. -. -.P -Packages are \fIbuilt\fR, which often means they\'re compiled in that -architecture and against that version of node\. To update them, you can -do: -. -.IP "" 4 -. -.nf -npm \-\-root \./deps rebuild -. -.fi -. -.IP "" 0 -. -.P -or run \fBnpm bundle deps\fR on the target machine\. -. -.P -The \fBnpm update\fR command will do \fIhorrible\fR things to a bundle folder\. -Don\'t ever point update at that root, or your bundles may no longer -satisfy your dependencies\. diff --git a/man/cache.1 b/man/cache.1 deleted file mode 100644 index 562fe5b23..000000000 --- a/man/cache.1 +++ /dev/null @@ -1,70 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-CACHE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-cache\fR \-\- install a package -. -.SH "SYNOPSIS" -. -.nf -npm cache add <tarball file> -npm cache add <folder> -npm cache add <tarball url> -npm cache add <name> <version> -npm cache ls [<path>] -npm cache clean [<pkg> [<version>]] -. -.fi -. -.SH "DESCRIPTION" -. -.IP "\(bu" 4 -add: -Access the local cache of package data\. This command is primarily -intended to be used internally by npm, but it can provide a way to -add data to the local installation cache explicitly\. -. -.IP -If two arguments are provided, then npm will fetch the data from the -registry\. This allows npm to use the filesystem as a local proxy to -the registry\. -. -.IP "\(bu" 4 -ls: -Show the data in the cache\. Additional arguments are joined together -in a path\-like fashion, but something like \fBnpm cache ls npm/0\.1\.5\fR is -acceptable as well\. -. -.IP "\(bu" 4 -clean: -Delete data out of the cache for a specific package and version, all -versions of a package, or all data for all packages, depending on the -arguments supplied\. -. -.IP -This can be used if invalid data gets into the cache\. -. -.IP "" 0 -. -.SH "DETAILS" -npm stores data for a version of a package in \fB$ROOT/\.npm/\.cache/<name>/<version>\fR\|\. Three pieces of data are stored -in this folder: -. -.IP "\(bu" 4 -package/: -A folder containing the package contents as they appear in the tarball\. -. -.IP "\(bu" 4 -package\.json: -The package\.json file, as npm sees it, with overlays applied and a _id attribute\. -. -.IP "\(bu" 4 -package\.tgz: -The tarball for that version\. -. -.IP "" 0 -. -.SH "HISTORY" -Added in npm version 0\.1\.6 diff --git a/man/coding-style.1 b/man/coding-style.1 deleted file mode 100644 index 46da97e48..000000000 --- a/man/coding-style.1 +++ /dev/null @@ -1,212 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-CODING\-STYLE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style -. -.SH "DESCRIPTION" -npm\'s coding style is a bit unconventional\. It is not different for -difference\'s sake, but rather a carefully crafted style that is -designed to reduce visual clutter and make bugs more apparent\. -. -.P -If you want to contribute to npm (which is very encouraged), you should -make your code conform to npm\'s style\. -. -.SH "Line Length" -Keep lines shorter than 80 characters\. It\'s better for lines to be -too short than to be too long\. Break up long lists, objects, and other -statements onto multiple lines\. -. -.SH "Indentation" -Two\-spaces\. Tabs are better, but they look like hell in web browsers -(and on github), and node uses 2 spaces, so that\'s that\. -. -.P -Configure your editor appropriately\. -. -.SH "Curly braces" -Curly braces belong on the same line as the thing that necessitates them\. -. -.P -Bad: -. -.IP "" 4 -. -.nf -function () -{ -. -.fi -. -.IP "" 0 -. -.P -Good: -. -.IP "" 4 -. -.nf -function () { -. -.fi -. -.IP "" 0 -. -.P -If a block needs to wrap to the next line, use a curly brace\. Don\'t -use it if it doesn\'t\. -. -.P -Bad: -. -.IP "" 4 -. -.nf -if (foo) { bar() } -while (foo) - bar() -. -.fi -. -.IP "" 0 -. -.P -Good: -. -.IP "" 4 -. -.nf -if (foo) bar() -while (foo) { - bar() -} -. -.fi -. -.IP "" 0 -. -.SH "Semicolons" -Don\'t use them except in three situations: -. -.IP "\(bu" 4 -for (;;) loops\. They\'re actually required\. -. -.IP "\(bu" 4 -case "foo": doSomething(); break -. -.IP "\(bu" 4 -In front of a leading ( or [ at the start of the line\. -This prevents the expression from being interpreted -as a function call or property access, respectively\. -. -.IP "" 0 -. -.P -Some examples of good semicolon usage: -. -.IP "" 4 -. -.nf -;(x || y)\.doSomething() -;[a, b, c]\.forEach(doSomething) -for (var i = 0; i < 10; i ++) { - switch (state) { - case "begin": start(); continue - case "end": finish(); break - default: throw new Error("unknown state") - } - end() -} -. -.fi -. -.IP "" 0 -. -.P -Note that starting lines with \fB\-\fR and \fB+\fR also should be prefixed -with a semicolon, but this is much less common\. -. -.SH "Comma First" -If there is a list of things separated by commas, and it wraps -across multiple lines, put the comma at the start of the next -line, directly below the token that starts the list\. Put the -final token in the list on a line by itself\. For example: -. -.IP "" 4 -. -.nf -var magicWords = [ "abracadabra" - , "gesundheit" - , "ventrilo" - ] - , spells = { "fireball" : function () { setOnFire() } - , "water" : function () { putOut() } - } - , a = 1 - , b = "abc" - , etc - , somethingElse -. -.fi -. -.IP "" 0 -. -.SH "Whitespace" -Put a single space in front of ( for anything other than a function call\. -Also use a single space wherever it makes things more readable\. -. -.P -Don\'t leave trailing whitespace at the end of lines\. Don\'t indent empty -lines\. Don\'t use more spaces than are helpful\. -. -.SH "Functions" -Use named functions\. They make stack traces a lot easier to read\. -. -.SH "Callbacks, Sync/async Style" -Use the asynchronous/non\-blocking versions of things as much as possible\. -It might make more sense for npm to use the synchronous fs APIs, but this -way, the fs and http and child process stuff all uses the same callback\-passing -methodology\. -. -.P -The callback should always be the last argument in the list\. Its first -argument is the Error or null\. -. -.P -Be very careful never to ever ever throw anything\. It\'s worse than useless\. -Just send the error message back as the first argument to the callback\. -. -.SH "Errors" -Always create a new Error object with your message\. Don\'t just return a -string message to the callback\. Stack traces are handy\. -. -.P -Use the \fBrequire("\./utils/log")\.er\fR function\. It takes a callback and an -error message, and returns an object that will report the message in the -event of a failure\. It\'s quite handy\. -. -.IP "" 4 -. -.nf -function myThing (args, cb) { - getData(args, function (er, data) { - if (er) return log\.er(cb, "Couldn\'t get data")(er) - doSomethingElse(data, cb) - }) -} -function justHasToWork (cb) { - doSomething(log\.er(cb, "the doSomething failed\.")) -} -. -.fi -. -.IP "" 0 -. -.SH "Logging" -Please clean up logs when they are no longer helpful\. In particular, -logging the same object over and over again is not helpful\. Logs should -report what\'s happening so that it\'s easier to track down where a fault -occurs\. diff --git a/man/config.1 b/man/config.1 deleted file mode 100644 index a6e96cf65..000000000 --- a/man/config.1 +++ /dev/null @@ -1,284 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-CONFIG" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-config\fR \-\- Manage the npm configuration file -. -.SH "SYNOPSIS" -. -.nf -npm config set <key> <value> [\-\-global] -npm config get <key> -npm config delete <key> -npm config list -. -.fi -. -.SH "DESCRIPTION" -npm gets its configuration values from 5 sources, in this priority: -. -.IP "\(bu" 4 -cli: -The command line flags\. Putting \fB\-\-foo bar\fR on the command line sets the \fBfoo\fR configuration parameter to \fB"bar"\fR\|\. A \fB\-\-\fR argument tells the cli -parser to stop reading flags\. A \fB\-\-flag\fR parameter that is at the \fIend\fR of -the command will be given the value of \fBtrue\fR\|\. -. -.IP "\(bu" 4 -env: -Any environment variables that start with \fBnpm_config_\fR will be interpreted -as a configuration parameter\. For example, putting \fBnpm_config_foo=bar\fR in -your environment will set the \fBfoo\fR configuration parameter to \fBbar\fR\|\. Any -environment configurations that are not given a value will be given the value -of \fBtrue\fR\|\. Config values are case\-insensitive, so \fBNPM_CONFIG_FOO=bar\fR will -work the same\. -. -.IP "\(bu" 4 -$HOME/\.npmrc (or the \fBuserconfig\fR param, if set above): -This file is an ini\-file formatted list of \fBkey = value\fR parameters\. -. -.IP "\(bu" 4 -$PREFIX/etc/npmrc (or the \fBglobalconfig\fR param, if set above): -This file is an ini\-file formatted list of \fBkey = value\fR parameters -. -.IP "\(bu" 4 -default configs: -This is a set of configuration parameters that are internal to npm, and are -defaults if nothing else is specified\. -. -.IP "" 0 -. -.SH "Sub\-commands" -Config supports the following sub\-commands: -. -.SS "set" -. -.nf -npm config set key value -. -.fi -. -.P -Sets the config key to the value\. -. -.SS "get" -. -.nf -npm config get key -. -.fi -. -.P -Echo the config value to stdout\. (NOTE: All the other npm logging is done to -stderr, so pipes should work properly, and you can do \fBnpm get key 2>/dev/null\fR -to print out JUST the config value\.) -. -.SS "list" -. -.nf -npm config list -. -.fi -. -.P -Show all the config settings\. -. -.SS "delete" -. -.nf -npm config delete key -. -.fi -. -.P -Deletes the key from all configuration files\. -. -.SH "Config Settings" -npm supports a very basic argument parser\. For any of the settings -in npm\-config(1), you can set them explicitly for a single command by -doing: -. -.IP "" 4 -. -.nf -npm \-\-key val <command> -. -.fi -. -.IP "" 0 -. -.P -Configurations defined on the command line are not saved to the \.npmrc file\. -. -.SS "loglevel" -Default: "info" -. -.P -The log level to show\. -. -.P -Each level maps to a numeric value, above which all logs must pass to be -seen\. So, setting it to "warn" shows "win", "error" and "warn" messages\. -. -.P -The log levels: -. -.IP "\(bu" 4 -silent: Show no output\. Nothing\. If there is output on stderr, it\'s -because something is broken\. -. -.IP "\(bu" 4 -win: Show the "npm ok" or "npm not ok", but that\'s all\. -. -.IP "\(bu" 4 -error: Errors, usually with a stack trace\. -. -.IP "\(bu" 4 -warn: Things that you should probably be aware of\. -. -.IP "\(bu" 4 -info: Helpful info\. -. -.IP "\(bu" 4 -silly: Not\-helpful info\. (Lots of dumping whole objects and such\.) -. -.IP "" 0 -. -.P -Note that output to stdout is always printed\. This setting just modifies -what\'s logged to stderr\. -. -.SS "auto\-activate" -Default: true -. -.P -Automatically activate a package after installation, if there is not an active -version already\. Set to "always" to always activate when installing\. -. -.SS "update\-dependents" -Default: true -. -.P -Automatically update a package\'s dependencies after installation, if it is the -newest version installed\. Set to "always" to update dependents when a new -version is installed, even if it\'s not the newest\. -. -.SS "root" -Default: \fB$INSTALL_PREFIX/lib/node\fR -. -.P -The root folder where packages are installed and npm keeps its data\. -. -.SS "binroot" -Default: \fB$INSTALL_PREFIX/bin\fR -. -.P -The folder where executable programs are installed\. -. -.P -Set to "false" to not install executables -. -.SS "manroot" -Default: $INSTALL_PREFIX/share/man -. -.P -The folder where man pages are installed\. -. -.P -Set to "false" to not install man pages\. -. -.SS "registry" -Default: https://registry\.npmjs\.org/ -. -.P -The base URL of the npm package registry\. -. -.SS "_auth" -A base\-64 encoded "user:pass" pair\. This is created by npm\-adduser(1)\. -. -.P -If your config file is ever corrupted, you can set this manually by doing: -. -.IP "" 4 -. -.nf -npm adduser -. -.fi -. -.IP "" 0 -. -.SS "_authCrypt" -If crypto\.Cipher is available, and you have some private keys in \fB$HOME/\.ssh\fR, -then npm will encrypt your "\fIauth" config before saving to the \.npmrc file, -and will decrypt the "\fRauthCrypt" config when it reads the \.npmrc file\. -. -.SS "tag" -Default: latest -. -.P -If you ask npm to install a package and don\'t tell it a specific version, then -it will install the specified tag\. -. -.P -Note: this has no effect on the npm\-tag(1) command\. -. -.SS "proxy" -If proxy is available, then npm will fetch the modules from the registry via -the proxy server\. -. -.P -Example: -. -.IP "" 4 -. -.nf -proxy = http://proxy\-server:8080 -. -.fi -. -.IP "" 0 -. -.SS "userconfig" -The default user configuration file is process\.env\.HOME+"/\.npmrc"\. -. -.P -Note that this must be provided either in the cli or env settings\. Once the -userconfig is read, it is irrelevant\. -. -.SS "globalconfig" -The default global configuration file is resolved based on the location of the -node executable\. It is process\.execPath+"/\.\./\.\./etc/npmrc"\. In the canonical -NodeJS installation with \fBmake install\fR, this is \fB/usr/local/etc/npmrc\fR\|\. If you -put the node binary somewhere else (for instance, if you are using nvm or -nave), then it would be resolved relative to that location\. -. -.P -Note that this must be provided in the cli, env, or userconfig settings\. Once -the globalconfig is read, this parameter is irrelevant\. -. -.SS "global" -If set to some truish value (for instance, by being the last cli flag or being -passed a literal \fBtrue\fR or \fB1\fR), and the \fBnpm config set\fR param is being -called, then the new configuration paramater is written global config file\. -Otherwise, they are saved to the user config file\. -. -.SS "dev" -If set to a truish value, then it\'ll install the "devDependencies" as well as -"dependencies" when installing a package\. -. -.P -Note that devDependencies are \fIalways\fR installed when linking a package\. -. -.SS "tar" -Default: env\.TAR or "tar" -. -.P -The name of a GNU\-compatible tar program on your system\. -. -.SS "gzip" -Default: env\.GZIPBIN or "gzip" -. -.P -The name of a GNU\-compatible gzip program on your system\. diff --git a/man/deactivate.1 b/man/deactivate.1 deleted file mode 100644 index c8b962ae4..000000000 --- a/man/deactivate.1 +++ /dev/null @@ -1,21 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-DEACTIVATE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-deactivate\fR \-\- Deactivate the active version of a package -. -.SH "SYNOPSIS" -. -.nf -npm deactivate <name> -. -.fi -. -.SH "DESCRIPTION" -If there\'s an active version of the package, this will unlink it from that -preferential position\. -. -.SH "SEE ALSO" -npm\-activate(1) diff --git a/man/developers.1 b/man/developers.1 deleted file mode 100644 index 6a3d30f56..000000000 --- a/man/developers.1 +++ /dev/null @@ -1,224 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-DEVELOPERS" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-developers\fR \-\- Developer Guide -. -.SH "DESCRIPTION" -So, you\'ve decided to use npm to publish your project\. -. -.P -Fantastic! -. -.P -There are a few things that you need to do above the simple steps -that your users will do to install your program\. -. -.SH "About These Documents" -These are man pages\. If you install npm, you should be able to -then do \fBman npm\-thing\fR to get the documentation on a particular -topic\. -. -.P -Any time you see "see npm\-whatever(1)", you can do \fBman npm\-whatever\fR -to get at the docs\. -. -.SH "The package\.json File" -You need to have a \fBpackage\.json\fR file in the root of your project\. -. -.P -See npm\-json(1) for details about what goes in that file\. At the very -least, you need: -. -.IP "\(bu" 4 -name: -This should be a string that identifies your project\. Please do not -use the name to specify that it runs on node, or is in JavaScript\. -You can use the "engines" field to explicitly state the versions of -node (or whatever else) that your program requires, and it\'s pretty -well assumed that it\'s javascript\. -. -.IP -It does not necessarily need to match your github repository name\. -. -.IP -So, \fBnode\-foo\fR and \fBbar\-js\fR are bad names\. \fBfoo\fR or \fBbar\fR are better\. -. -.IP "\(bu" 4 -version: -A semver\-compatible version\. -. -.IP "\(bu" 4 -engines: -Specify the versions of node (or whatever else) that your program -runs on\. The node API changes a lot, and there may be bugs or new -functionality that you depend on\. Be explicit\. -. -.IP "\(bu" 4 -author: -Take some credit\. -. -.IP "\(bu" 4 -scripts: -If you have a special compilation or installation script, then you -should put it in the \fBscripts\fR hash\. See npm\-scripts(1)\. -. -.IP "\(bu" 4 -main: -If you have a single module that serves as the entry point to your -program (like what the "foo" package gives you at require("foo")), -then you need to specify that in the "main" field\. -. -.IP "" 0 -. -.SH "Make Sure Your Package Installs and Works" -\fBThis is important\.\fR -. -.P -If you can not install it locally, you\'ll have -problems trying to publish it\. Or, worse yet, you\'ll be able to -publish it, but you\'ll be publishing a broken or pointless package\. -So don\'t do that\. -. -.P -In the root of your package, do this: -. -.IP "" 4 -. -.nf -npm install \. -. -.fi -. -.IP "" 0 -. -.P -That\'ll show you that it\'s working\. If you\'d rather just create a symlink -package that points to your working directory, then do this: -. -.IP "" 4 -. -.nf -npm link \. -. -.fi -. -.IP "" 0 -. -.P -Use \fBnpm ls installed\fR to see if it\'s there\. -. -.P -Then go into the node\-repl, and try using require() to bring in your module\'s -main and libs things\. Assuming that you have a package like this: -. -.IP "" 4 -. -.nf -node_foo/ - lib/ - foo\.js - bar\.js -. -.fi -. -.IP "" 0 -. -.P -and you define your package\.json with this in it: -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "directories" : { "lib" : "\./lib" } -, "main" : "\./lib/foo" -} -. -.fi -. -.IP "" 0 -. -.P -then you\'d want to make sure that require("foo") and require("foo/bar") both -work and bring in the appropriate modules\. -. -.SH "Compile Node with OpenSSL" -npm will stubbornly refuse to expose your password in the clear\. That -means that you\'ll have to install whatever package provides openssl\.h -on your system\. When you \fB\|\./configure\fR node, make sure that it says: -. -.IP "" 4 -. -.nf -Checking for openssl : yes -. -.fi -. -.IP "" 0 -. -.SH "Create a User Account" -Create a user with the adduser command\. It works like this: -. -.IP "" 4 -. -.nf -npm adduser bob password bob@email\.com -. -.fi -. -.IP "" 0 -. -.P -This is documented better in npm\-adduser(1)\. So do this to get the -details: -. -.IP "" 4 -. -.nf -man npm\-adduser -. -.fi -. -.IP "" 0 -. -.SH "Publish your package" -This part\'s easy\. -. -.IP "" 4 -. -.nf -npm publish /path/to/my\-package -. -.fi -. -.IP "" 0 -. -.P -You can give publish a url to a tarball, or a filename of a tarball, -or a path to a folder\. (Paths have to either be "\." or contain a "/"\.) -. -.SH "Tag your package as "stable"" -This makes it easier to install without your users having to know the -version ahead of time\. -. -.IP "" 4 -. -.nf -npm tag my\-package@1\.2\.3 stable -. -.fi -. -.IP "" 0 -. -.P -You can also use other tags, but "stable" and "latest" have reserved -meanings\. -. -.SH "Brag about it" -Send emails, write blogs, blab in IRC\. -. -.P -Tell the world how easy it is to install your program! diff --git a/man/folders.1 b/man/folders.1 deleted file mode 100644 index cc2e761db..000000000 --- a/man/folders.1 +++ /dev/null @@ -1,59 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-FOLDERS" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-folders\fR \-\- Folder Structures Used by npm -. -.SH "DESCRIPTION" -Everything lives in the \fBroot\fR setting\. Check \fBnpm help config\fR for more -on configuration options\. -. -.P -\fBroot/\.npm/foo\fR is where the stuff for package \fBfoo\fR would go\. -. -.P -\fBroot/\.npm/foo/1\.0\.0/package\fR the contents of the tarball containing foo -version 1\.0\.0 -. -.P -\fBroot/\.npm/foo/1\.0\.0/main\.js\fR Generated file that exports the \fBmain\fR module in -foo\. This is a shim, not a symbolic link, so that relative paths will work -appropriately\. -. -.P -\fBroot/foo\-1\.0\.0/{module\-name}\.js\fR Generated shim corresponding to a module -defined in the modules option\. The module shim requires \fBroot/\.npm/foo/1\.0\.0/package/{module\-path}\.js\fR -. -.P -The \fBmain\fR script is implemented by creating an \fBindex\.js\fR file in this folder\. -. -.P -\fBroot/foo/\fR Symlink to the active version\'s module folder\. -. -.P -\fBroot/\.npm/foo/active\fR symlink to the active version\. -. -.P -\fBroot/\.npm/foo/1\.0\.0/dependencies\fR links to the modules that foo depends upon\. -This is loaded into the require path first in the foo shims\. -. -.P -\fBroot/\.npm/foo/1\.0\.0/dependson\fR links to the package folders that foo depends -on\. This is here so that npm can access those packages programmatically\. -. -.P -\fBroot/\.npm/foo/1\.0\.0/dependents\fR links to the packages that depend upon foo\. -. -.P -\fBroot/\.npm/\.cache\fR the cache folder\. -. -.P -\fBroot/\.npm/\.cache/foo/1\.0\.0/package\.json\fR the parsed package\.json for foo@1\.0\.0 -. -.P -\fBroot/\.npm/\.cache/foo/1\.0\.0/package\.tgz\fR the tarball of foo@1\.0\.0 -. -.P -\fBroot/\.npm/\.cache/foo/1\.0\.0/package\fR the untouched pristine copy of foo@1\.0\.0 diff --git a/man/future-ideas/deploy.1 b/man/future-ideas/deploy.1 deleted file mode 100644 index c2f900f94..000000000 --- a/man/future-ideas/deploy.1 +++ /dev/null @@ -1,49 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-DEPLOY" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-deploy\fR \-\- Deploy a package to a remote host -. -.SH "FUTURE" -This functionality does not yet exist\. -. -.SH "SUMMARY" -. -.nf -npm deploy <pkg> [\-\-host <hostname>] -. -.fi -. -.SH "DESCRIPTION" -This is a porcelain command\. It is equivalent to doing: -. -.IP "" 4 -. -.nf -npm publish \-\-registry $(npm config get host) <pkg> -npm remote install <pkg\-name>@<pkg\-version> -. -.fi -. -.IP "" 0 -. -.P -That is, it first publishes the package to the server specified -by the \fBhost\fR config, and then remotely installs that package -on the host\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm\-remote(1) -. -.IP "\(bu" 4 -npm\-site(1) -. -.IP "\(bu" 4 -npm\-publish(1) -. -.IP "" 0 - diff --git a/man/future-ideas/remote.1 b/man/future-ideas/remote.1 deleted file mode 100644 index c0075aab9..000000000 --- a/man/future-ideas/remote.1 +++ /dev/null @@ -1,28 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-REMOTE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-remote\fR \-\- Execute commands on a remote machine -. -.SH "FUTURE" -This functionality does not yet exist\. -. -.SH "SYNOPSIS" -. -.nf -npm remote <commands> -. -.fi -. -.SH "DESCRIPTION" -Run a command on a remote npm site instance\. -. -.P -In order to do this, the current authenticated user must be in -the "admin" list on the server, and it must be running with https -support\. -. -.P -It uses the \fBhost\fR config to know where to do things\. diff --git a/man/future-ideas/site.1 b/man/future-ideas/site.1 deleted file mode 100644 index 7cbf86604..000000000 --- a/man/future-ideas/site.1 +++ /dev/null @@ -1,79 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-SITE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-site\fR \-\- Run the npm web site -. -.SH "FUTURE" -This functionality does not yet exist\. -. -.SH "SYNOPSIS" -. -.nf -npm site [ start | stop ] -. -.fi -. -.SH "DESCRIPTION" -This starts up npm in "site" mode\. The following configs are relevant, -and can either be specified in the \fB\|\.npmrc\fR file, or as command line -options\. -. -.IP "\(bu" 4 -userfile: -A file containing the encrypted authorization info for all users\. If -specified, then this is used for \fBnpm adduser\fR requests -to this registry\. -. -.IP "\(bu" 4 -admin: -A comma\-delimited list of admin users\. All of these must already be -in the local adduser config\. If there is no admin, then the site will -not allow remote management\. All admin usernames must already be -in the userfile, and a userfile must be specified\. -. -.IP "\(bu" 4 -listen: -Ports to listen on for WS requests\. The first number is for http, -the second for https, and the third for secure TCP\. Set any to "\-", -or omit, to use the default\. -Defaults to "80,443,15443" -. -.IP "\(bu" 4 -registry: -If a package is not found, then its contents will be fetched from the -upstream registry, and cached for future retrieval\. -. -.IP -isaacs: Make sure that this does loop\-detection, so that a "ring" of -registries can work as a distributed network\. Also, once we have -support for checking multiple registries, you could have a distribution -ring that secondarily depends on some other upstream resource\. -. -.IP "" 0 -. -.P -The content for the site is stored in the npm cache directory, which is -inside the folder used for the \fBroot\fR setting, at \fB{root}/\.npm/\.cache\fR\|\. -It is organized in a simple hierarchical folder structure corresponding -to the web service URLs that npm uses\. -. -.SH "TCP Server" -The TCP server starts up to support the \fBnpm remote\fR command, if there is -a valid admin userlist\. -. -.SH "NOTE" -This also is what happens when you do \fBnpm start npm\fR\|\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm\-remote(1) -. -.IP "\(bu" 4 -npm\-config(1) -. -.IP "" 0 - diff --git a/man/help.1 b/man/help.1 deleted file mode 100644 index fb6592c20..000000000 --- a/man/help.1 +++ /dev/null @@ -1,147 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-HELP" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-help\fR \-\- Get help about npm commands -. -.SH "SYNOPSIS" -. -.nf -npm help <section> -. -.fi -. -.SH "DESCRIPTION" -\fB<section>\fR is one of: -activate -adduser -build -bundle -cache -coding\-style -config -deactivate -developers -folders -future\-ideas/deploy -future\-ideas/remote -future\-ideas/site -help -install -json -link -list -ln -ls -npm -owner -publish -rebuild -restart -rm -scripts -start -stop -tag -test -uninstall -unpublish -update -view -. -.SH "12\-second Intro" -You probably got npm because you want to install stuff\. -. -.P -Use \fBnpm install blerg\fR to install the latest version of "blerg"\. Check out \fBnpm help install\fR for more info\. It can do a lot of stuff\. -. -.P -Use the \fBnpm ls\fR command to show everything that\'s available\. Looking for -express\-related modules? \fBnpm ls express\fR\|\. Looking for the latest express? \fBnpm ls express latest\fR\|\. (The arguments are just simple greps\.) And of course, \fBnpm help ls\fR will tell you more\. -. -.P -Use \fBnpm ls installed\fR to show everything you\'ve installed\. -. -.SH "Where to go for help" -Come bug isaacs in irc://freenode\.net#node\.js\. He\'ll ask you to copy the npm -output to a pastie or gist, and perhaps to post an issue if it\'s a new bug\. -. -.P -Failing that, report the issue: -. -.IP "\(bu" 4 -web: \fIhttp://github\.com/isaacs/npm/issues\fR -. -.IP "\(bu" 4 -email: \fInpm\-@googlegroups\.com\fR -. -.IP "" 0 -. -.P -If you ask something that\'s answered by this doc, you may be told to RTFM\. -So, save yourself some time and read it now\. -. -.SH "Configs" -Use the \fBnpm config\fR command to manage how npm does stuff and where it puts things\. -It stores your configs in the \fB~/\.npmrc\fR file\. Check \fBnpm help config\fR for more -info on that, if you care\. -. -.P -You can override any config for just a single command by doing \fB\-\-configname value\fR -on the command line\. -. -.SH "Developers" -If you\'re using npm to develop and publish your code, check out the following topics: -. -.IP "\(bu" 4 -json: -Make a package\.json file\. The "json" help doc will tell you what to put in it\. -. -.IP "\(bu" 4 -link: -For linking your current working code into Node\'s path, so that you don\'t have to -reinstall every time you make a change\. Use "npm link" to do this\. -. -.IP "\(bu" 4 -install: -It\'s a good idea to install things if you don\'t need the symbolic link\. Especially, -installing other peoples code from the registry is done via "npm install"\. -. -.IP "\(bu" 4 -adduser: -Use the \fBnpm adduser\fR command to add a user account for the npm registry, or to -authorize yourself on a new machine\. If you forget your password, send an email -to \fInpm\-@googlegroups\.com\fR and we\'ll delete your account so you can recreate it\. -. -.IP "\(bu" 4 -publish: -Use the \fBnpm publish\fR command to upload your code to the registry, so that other -people can install it easily\. -. -.IP "" 0 -. -.SH "Contributing" -Patches welcome! -. -.IP "\(bu" 4 -code: -Read through \fBnpm help coding\-style\fR if you plan to submit code\. You don\'t have to -agree with it, but you do have to follow it\. -. -.IP "\(bu" 4 -docs: -If you find an error in the documentation, edit the appropriate markdown file in the -"doc" folder\. If you have the "ronn" gem installed, then you can \fBmake doc\fR to build -the man page, but this is not necessary for your patch to be accepted\. -. -.IP "\(bu" 4 -tests: -The tests are pretty limited\. It would be great to perhaps use -something like expresso or vows\. -. -.IP "" 0 -. -.P -Contributors are listed in npm\'s \fBpackage\.json\fR file\. diff --git a/man/install.1 b/man/install.1 deleted file mode 100644 index 6db65c96e..000000000 --- a/man/install.1 +++ /dev/null @@ -1,140 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-INSTALL" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-install\fR \-\- install a package -. -.SH "SYNOPSIS" -. -.nf -npm install <tarball file> -npm install <tarball url> -npm install <folder> -npm install <pkg> -npm install <pkg>@<tag> -npm install <pkg>@<version> -npm install <pkg>@<version range> -. -.fi -. -.SH "DESCRIPTION" -This command installs a package, and any packages that it depends on\. It -resolves circular dependencies by talking to the npm registry\. -. -.IP "\(bu" 4 -npm install \fB<tarball file>\fR: -Install a package that is sitting on the filesystem\. Note: if you just want -to link a dev directory into your npm root, you can do this more easily by -using \fBnpm link\fR\|\. -. -.IP -In order to distinguish between this and remote installs, the argument -must either be "\." or contain a "/" in it\. -. -.IP -Example: -. -.IP - npm install \./package\.tgz -. -.IP "\(bu" 4 -npm install \fB<tarball url>\fR: -Fetch the tarball url, and then install it\. In order to distinguish between -this and other options, the argument must start with "http://" or "https://" -. -.IP -Example: -. -.IP - npm install http://github\.com/waveto/node\-crypto/tarball/v0\.0\.5 -. -.IP "\(bu" 4 -npm install \fB<pkg>\fR: -Do a \fB<pkg>@<tag>\fR install, where \fB<tag>\fR is the "tag" config from either your -\|\.npmrc file, or the \-\-tag argument on the command line\. -. -.IP -Example: -. -.IP - npm install sax -. -.IP "\(bu" 4 -npm install \fB<pkg>@<tag>\fR: -Install the version of the package that is referenced by the specified tag\. -If the tag does not exist in the registry data for that package, then this -will fail\. -. -.IP -Example: -. -.IP - npm install sax@stable -. -.IP "\(bu" 4 -npm install \fB<pkg>@<version>\fR: -Install the specified version of the package\. This will fail if the version -has not been published to the registry\. -. -.IP -Example: -. -.IP - npm install sax@0\.1\.1 -. -.IP "\(bu" 4 -npm install \fB<pkg>@<version range>\fR: -Install a version of the package matching the specified version range\. This -will follow the same rules for resolving dependencies described in \fBnpm help json\fR\|\. -. -.IP -Note that most version ranges must be put in quotes so that your shell will -treat it as a single argument\. -. -.IP -Example: -. -.IP - npm install sax@">=0\.1\.0 <0\.2\.0" -. -.IP "" 0 -. -.P -You may combine multiple arguments, and even multiple types of arguments\. For example: -. -.IP "" 4 -. -.nf -npm install sax@">=0\.1\.0 <0\.2\.0" bench supervisor -. -.fi -. -.IP "" 0 -. -.P -The \fB\-\-tag\fR argument will apply to all of the specified install targets\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm\-build(1) -. -.IP "\(bu" 4 -npm\-registry(1) -. -.IP "\(bu" 4 -npm\-build(1) -. -.IP "\(bu" 4 -npm\-link(1) -. -.IP "\(bu" 4 -npm\-folders(1) -. -.IP "\(bu" 4 -npm\-tag(1) -. -.IP "" 0 - diff --git a/man/json.1 b/man/json.1 deleted file mode 100644 index bf18c5fcf..000000000 --- a/man/json.1 +++ /dev/null @@ -1,469 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-JSON" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling -. -.SH "DESCRIPTION" -npm aims to implement the commonjs Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec\. However, some -adjustments have been made, which may eventually be unmade, but hopefully will -be incorporated into the spec\. -. -.P -This document is all you need to know about what\'s required in your package\.json -file\. -. -.P -A lot of the behavior described in this document is affected by the config -settings described in \fBnpm help config\fR\|\. -. -.SH "name" -The \fImost\fR important things in your package\.json are the name and version fields\. -. -.P -The name is what your thing is called\. Some tips: -. -.IP "\(bu" 4 -Don\'t put "js" or "node" in the name\. It\'s assumed that it\'s js, since you\'re -writing a package\.json file, and you can specify the engine using the "engines" -field\. (See below\.) -. -.IP "\(bu" 4 -The name ends up being part of a URL, an argument on the command line, and a -folder name\. So, don\'t use characters that are annoying in those contexts, like -funny UTF things or parentheses or slashes, or else it\'ll break\. -. -.IP "\(bu" 4 -The name will probably be passed as an argument to require(), so it should -be something short, but also reasonably descriptive\. -. -.IP "\(bu" 4 -You may want to check the npm registry to see if there\'s something by that name -already, before you get too attached to it\. http://registry\.npmjs\.org/ -. -.IP "" 0 -. -.SH "version" -The \fImost\fR important things in your package\.json are the name and version fields\. -. -.P -Version must be semver \fIhttp://semver\.org\fR\-compliant\. npm assumes that you\'ve -read the semver page, and that you comply with it\. Here\'s how it deviates from -what\'s on semver\.org: -. -.IP "\(bu" 4 -Versions can start with "v" -. -.IP "\(bu" 4 -A numeric item separated from the main three\-number version by a hyphen -will be interpreted as a "build" number, and will \fIincrease\fR the version\. -But, if the tag is not a number separated by a hyphen, then it\'s treated -as a pre\-release tag, and is \fIless than\fR the version without a tag\. -So, 0\.1\.2\-7 > 0\.1\.2\-6 > 0\.1\.2 > 0\.1\.2beta -. -.IP "" 0 -. -.P -This is a little bit confusing to explain, but matches what you see in practice -when people create tags in git like "v1\.2\.3" and then do "git describe" to generate -a patch version\. (This is how node\'s versions are generated, and has driven this -design\.) -. -.SH "description" -Put a description in it\. It\'s a string\. -. -.SH "homepage" -The url to the project homepage\. -. -.SH ""people" fields: author, contributors" -The "author" is one person\. "contributors" is an array of people\. A "person" -is an object with a "name" field and optionally "url" and "email", like this: -. -.IP "" 4 -. -.nf -{ "name" : "Barney Rubble" -, "email" : "b@rubble\.com" -, "url" : "http://barnyrubble\.tumblr\.com/" -} -. -.fi -. -.IP "" 0 -. -.P -Or you can shorten that all into a single string, and npm will parse it for you: -. -.IP "" 4 -. -.nf -"Barney Rubble <b@rubble\.com> (http://barnyrubble\.tumblr\.com/) -. -.fi -. -.IP "" 0 -. -.P -Both email and url are optional either way\. -. -.P -npm also sets a top\-level "maintainers" field with your npm user info\. -. -.SH "main" -The main field is a module ID that is the primary entry point to your program\. -That is, if your package is named \fBfoo\fR, and a user installs it, and then does \fBrequire("foo")\fR, then your main module\'s exports object will be returned\. -. -.P -This should be a module ID relative to the root of your package folder\. -. -.P -For most modules, it makes the most sense to have a main script and often not -much else\. -. -.SH "bin" -A lot of packages have one or more executable files that they\'d like to -install into the PATH\. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable\.) -. -.P -To use this, supply a \fBbin\fR field in your package\.json which is a map of -command name to local file name\. On install, npm will link that file into -place right next to wherever node is installed\. (Presumably, this is in your -PATH, and defaults to \fB/usr/local/bin\fR\|\.) On activation, the versioned file -will get linked to the main filename (just like how the main\.js stuff works, -but with an executable in the PATH\.) -. -.P -For example, npm has this: -. -.IP "" 4 -. -.nf -{ "bin" : { "npm" : "\./cli\.js" } } -. -.fi -. -.IP "" 0 -. -.P -So, when you install npm, it\'ll create a symlink from the \fBcli\.js\fR script to \fB/usr/local/bin/npm\-version\fR\|\. Then, when you activate that version, it\'ll -create a symlink from \fB/usr/local/bin/npm\-version\fR to \fB/usr/local/bin/npm\fR\|\. -. -.SH "modules" -The "modules" member exposes CommonJS modules in the package\. So, if you had a -package named \fBfoo\fR, and the package\.json contains \fB"modules":{"bar":"\./lib/baz"}\fR, -and there was a file called \fB\|\./lib/baz\.js\fR, then require("foo/bar") would include -the module defined in \fB\|\./lib/baz\.js\fR\|\. -. -.P -Subfolders are supported, so you can do this: -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "modules" : - { "bar/baz" : "\./lib/bar/baz" - , "quux" : "\./quux" - } -} -. -.fi -. -.IP "" 0 -. -.P -And then, doing \fBrequire("foo/bar/baz")\fR would return the module at \fB\|\./lib/bar/baz\fR -in the foo package\. -. -.P -Just like the \fBmain\fR script, the modules linked in this fashion will have their -dependencies and paths set up properly by npm\. (In fact, "main" is just sugar -around setting a module named "index"\.) -. -.SH "man" -Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find\. -. -.P -If only a single file is provided, then it\'s installed such that it is the -result from \fBman <pkgname>\fR, regardless of its actual filename\. For example: -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "man" : "\./man/doc\.1" -} -. -.fi -. -.IP "" 0 -. -.P -would link the \fB\|\./man/doc\.1\fR file in such that it is the target for \fBman foo\fR -. -.P -If the filename doesn\'t start with the package name, then it\'s prefixed\. -So, this: -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ] -} -. -.fi -. -.IP "" 0 -. -.P -will create files to do \fBman foo\fR and \fBman foo\-bar\fR\|\. -. -.P -Man files must end with a number, and optionally a \fB\|\.gz\fR suffix if they are -compressed\. The number dictates which man section the file is installed into\. -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ] -} -. -.fi -. -.IP "" 0 -. -.P -will create entries for \fBman foo\fR and \fBman 2 foo\fR -. -.SH "directories" -The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a -few ways that you can indicate the structure of your package using a \fBdirectories\fR -hash\. If you look at npm\'s package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR, -you\'ll see that it has directories for doc, lib, and man\. -. -.P -In the future, this information may be used in other creative ways\. -. -.SS "directories\.lib" -If you specify a "lib" directory, and do not supply a modules hash, then the lib -folder will be walked and any \fI\|\.js or \fR\|\.node files found will be exposed as a -default module hash\. -. -.P -Providing an explicit modules hash is encouraged over exposing the entire lib -folder\. -. -.SS "directories\.bin" -If you specify a "bin" directory, then all the files in that folder will be used -as the "bin" hash\. -. -.P -If you have a "bin" hash already, then this has no effect\. -. -.SH "repository" -Specify the place where your code lives\. This is helpful for people who want to -contribute, as well as perhaps maybe being the underpinning of some magical "track -this package on git" feature someday maybe if somebody wants to write it ever\. -. -.P -Do it like this: -. -.IP "" 4 -. -.nf -"repository" : - { "type" : "git" - , "url" : "http://github\.com/isaacs/npm\.git" - } -"repository" : - { "type" : "svn" - , "url" : "http://v8\.googlecode\.com/svn/trunk/" - } -. -.fi -. -.IP "" 0 -. -.P -The URL should be a publicly available (perhaps read\-only) url that can be handed -directly to a VCS program without any modification\. It should not be a url to an -html project page that you put in your browser\. It\'s for computers\. -. -.P -Here are some examples of Doing It Wrong: -. -.IP "" 4 -. -.nf -WRONG! -"repository" : - { "type" : "git" - , "url" : "git@github\.com:isaacs/npm\.git" <\-\- THIS IS PRIVATE! - } -ALSO WRONG! -"repository" : - { "type" : "git" - , "url" : "http://github\.com/isaacs/npm" <\-\- THIS IS WEBPAGE! - } -. -.fi -. -.IP "" 0 -. -.SH "scripts" -The "scripts" member is an object hash of script commands that are run -at various times in the lifecycle of your package\. The key is the lifecycle -event, and the value is the command to run at that point\. -. -.P -See \fBnpm help scripts\fR to find out more about writing package scripts\. -. -.SH "dependencies" -Dependencies are specified with a simple hash of package name to version -range\. The version range is EITHER a string with has one or more -space\-separated descriptors, OR a range like "fromVersion \- toVersion" -. -.P -Version range descriptors may be any of the following styles, where "version" -is a semver compatible version identifier\. -. -.IP "\(bu" 4 -\fBversion\fR Must match \fBversion\fR exactly -. -.IP "\(bu" 4 -\fB=version\fR Same as just \fBversion\fR -. -.IP "\(bu" 4 -\fB>version\fR Must be greater than \fBversion\fR -. -.IP "\(bu" 4 -\fB>=version\fR etc -. -.IP "\(bu" 4 -\fB<version\fR -. -.IP "\(bu" 4 -\fB<=version\fR -. -.IP "\(bu" 4 -\fB*\fR Matches any version -. -.IP "\(bu" 4 -\fB""\fR (just an empty string) Same as \fB*\fR -. -.IP "\(bu" 4 -\fBversion1 \- version2\fR Same as \fB>=version1 <=version2\fR\|\. -. -.IP "" 0 -. -.P -For example, these are all valid: -. -.IP "" 4 -. -.nf -{ "dependencies" : - { "foo" : "1\.0\.0 \- 2\.9999\.9999" - , "bar" : ">=1\.0\.2 <2\.1\.2" - , "baz" : ">1\.0\.2 <=2\.3\.4" - , "boo" : "2\.0\.1" - } -} -. -.fi -. -.IP "" 0 -. -.SH "engines" -Packages/1\.0 says that you can have an "engines" field with an array of engine -names\. However, it has no provision for specifying which version of the engine -your stuff runs on\. -. -.P -With npm, you can use either of the following styles to specify the version of -node that your stuff works on: -. -.IP "" 4 -. -.nf -{ "engines" : [ "node >=0\.1\.27 <0\.1\.30" ] } -. -.fi -. -.IP "" 0 -. -.P -or: -. -.IP "" 4 -. -.nf -{ "engines" : { "node" : ">=0\.1\.27 <0\.1\.30" } } -. -.fi -. -.IP "" 0 -. -.P -And, like with dependencies, if you don\'t specify the version (or if you -specify "*" as the version), then any version of node will do\. -. -.P -If you specify an "engines" field, then npm will require that "node" be -somewhere on that list\. If "engines" is omitted, then npm will just assume -that it works on node\. -. -.SH "overlay" -npm responds to the \fBnode\fR and \fBnpm\fR env\-specific package\.json values, which -you can hang on the "overlay" key\. -. -.P -For example: -. -.IP "" 4 -. -.nf -{ "name" : "foo" -, "version" : 7 -, "description" : "generic description" -, "overlay" : - { "node" : - { "name" : "bar" - , "description" : "description for node" - } - , "npm" : - { "version" : "1\.0\.7" - , "description" : "description for npm" - } - , "narwhal" : - { "description" : "description for narwhal" } - } -} -. -.fi -. -.IP "" 0 -. -.P -In this case, this is what npm will treat it as: -. -.IP "" 4 -. -.nf -{ "name" : "bar" -, "version" : "1\.0\.7" -, "description" : "description for npm" -} -. -.fi -. -.IP "" 0 -. -.P -This way, even if npm is not exactly the same as some other package management -system, you can still use both, and it can be a happy planet\. diff --git a/man/link.1 b/man/link.1 deleted file mode 100644 index 5c889148f..000000000 --- a/man/link.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-LINK" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-link\fR \-\- Symlink a package folder -. -.SH "SYNOPSIS" -. -.nf -npm link <folder> -. -.fi -. -.SH "DESCRIPTION" -This will link a source folder into npm\'s registry using a symlink, and then -build it according to the package\.json file in that folder\'s root\. This is -handy for installing your own stuff, so that you can work on it and test it -iteratively without having to continually rebuild\. diff --git a/man/list.1 b/man/list.1 deleted file mode 100644 index 6df42b60f..000000000 --- a/man/list.1 +++ /dev/null @@ -1,52 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-LIST" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-list\fR \-\- List installed packages -. -.SH "SYNOPSIS" -. -.nf -npm list -npm ls -. -.fi -. -.SH "DESCRIPTION" -This command will print to stdout all the versions of packages that are -either installed or available in the registry, with their tags and whether -or not they\'re active and/or stable\. -. -.P -To filter a single package or state, you can provide words to filter on -and highlight (if appropriate)\. For instance, to see all the stable -packages, you could do this: -. -.IP "" 4 -. -.nf -npm ls stable -. -.fi -. -.IP "" 0 -. -.P -Another common usage is to find the set of all packages that are -installed\. This can be accomplished by doing this: -. -.IP "" 4 -. -.nf -npm ls installed -. -.fi -. -.IP "" 0 -. -.P -Strings are matched using the JavaScript "split" function, so regular -expression strings are ok\. However, the highlighting is a simple -split/join, so regexps probably won\'t get the funky colors\. diff --git a/man/ln.1 b/man/ln.1 deleted file mode 100644 index 5c889148f..000000000 --- a/man/ln.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-LINK" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-link\fR \-\- Symlink a package folder -. -.SH "SYNOPSIS" -. -.nf -npm link <folder> -. -.fi -. -.SH "DESCRIPTION" -This will link a source folder into npm\'s registry using a symlink, and then -build it according to the package\.json file in that folder\'s root\. This is -handy for installing your own stuff, so that you can work on it and test it -iteratively without having to continually rebuild\. diff --git a/man/ls.1 b/man/ls.1 deleted file mode 100644 index 6df42b60f..000000000 --- a/man/ls.1 +++ /dev/null @@ -1,52 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-LIST" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-list\fR \-\- List installed packages -. -.SH "SYNOPSIS" -. -.nf -npm list -npm ls -. -.fi -. -.SH "DESCRIPTION" -This command will print to stdout all the versions of packages that are -either installed or available in the registry, with their tags and whether -or not they\'re active and/or stable\. -. -.P -To filter a single package or state, you can provide words to filter on -and highlight (if appropriate)\. For instance, to see all the stable -packages, you could do this: -. -.IP "" 4 -. -.nf -npm ls stable -. -.fi -. -.IP "" 0 -. -.P -Another common usage is to find the set of all packages that are -installed\. This can be accomplished by doing this: -. -.IP "" 4 -. -.nf -npm ls installed -. -.fi -. -.IP "" 0 -. -.P -Strings are matched using the JavaScript "split" function, so regular -expression strings are ok\. However, the highlighting is a simple -split/join, so regexps probably won\'t get the funky colors\. diff --git a/man/npm.1 b/man/npm.1 deleted file mode 100644 index d6c7f45c4..000000000 --- a/man/npm.1 +++ /dev/null @@ -1,415 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm\fR \-\- node package manager -. -.SH "SYNOPSIS" -. -.nf -npm <command> [args] -. -.fi -. -.SH "DESCRIPTION" -npm is a little package manager for the Node javascript library\. -. -.P -Run \fBnpm help\fR for help\. That\'s probably what you meant to do\. -. -.SH "STATUS: Useful Beta" -The core functionality is there\. It works\. -. -.P -Please use this software\. It will cut you occasionally\. Let me know when -you find a rough edge, and I\'ll sand it down for you\. -. -.P -I appreciate your sense of adventure\. -. -.SH "PRINCIPLES" -Put the files where they need to be so that node can find them using the -methods it already uses\. -. -.P -Be lazy, not clever\. -. -.P -The file system is the database\. -. -.P -Sync with habits that are already in use\. -. -.P -Packages should be maintained by their authors, not by the package manager -author\. -. -.P -Steer clear of dependency hell\. -. -.SH "BUGS" -Plenty\. Luckily, npm is actively maintained as of this writing\. -. -.P -When you find issues, please report them: -. -.IP "\(bu" 4 -web: \fIhttp://github\.com/isaacs/npm/issues\fR -. -.IP "\(bu" 4 -email: \fInpm\-@googlegroups\.com\fR -. -.IP "" 0 -. -.P -Be sure to include \fIall\fR of the output from the npm command that didn\'t work -as expected\. -. -.SH "HISTORY" -. -.IP "\(bu" 4 -0\.0\.1: -Lots of sketches and false starts\. Abandoned a few times\. -. -.IP "\(bu" 4 -0\.0\.2: -Install worked mostly\. Still promise\-based\. -. -.IP "\(bu" 4 -0\.0\.3: -Converted to callbacks\. -. -.br -Mikeal Rogers wrote a registry for it\. -. -.IP "\(bu" 4 -0\.0\.4: -version dependencies -. -.br -link packages -. -.br -activation -. -.br -lifecycle scripts -. -.br -bin linking -. -.br -uninstallation -. -.IP "\(bu" 4 -0\.0\.5: -fix a few bugs in uninstall wrt dependent packages -. -.br -fix relative require()for nodejs modules installed with the "bin" field\. -. -.br -(issue #2) -. -.br -update to work with node 0\.1\.33 (aka net2) -. -.br -added publish and tag commands -. -.IP "\(bu" 4 -0\.0\.6: -set up a public registry -. -.br -send content\-length with registry PUTs -. -.br -adduser command (Mikeal Rogers) -. -.br -ini file stuff (Mikeal Rogers) -. -.br -env\-specific package\.json -. -.br -added more info to npm\'s the package\.json (bugs, contributors, etc\.) -. -.IP "\(bu" 4 -0\.0\.7: -fixed a few bugs in semver -. -.br -refactor documentation -. -.br -add "help" command -. -.br -add install from registry -. -.br -everything else core -. -.br -push to beta -. -.IP "\(bu" 4 -0\.1\.0 \- 0\.1\.2: -push to beta, and announce -. -.br -clean up some bugs around lifecycle scripts -. -.br -reduce reliance on makefile -. -.br -documentation updates -. -.br -Fixed DOA bugs -. -.br -Removed dependence on ronn -. -.IP "\(bu" 4 -0\.1\.3: -Changed a few details with configs (fix #5) -. -.br -Update adduser and publish to put author info in the data -. -.br -Use buffer api for file writes, hopefully fix #4 -. -.IP "\(bu" 4 -0\.1\.4 \- 0\.1\.5: -Fixes for a few more bugs and fix some documentation\. -. -.IP "\(bu" 4 -0\.1\.6 \- 0\.1\.7: -Add cache functionality -. -.br -Use couchdb attachments to host tarballs -. -.br -Handle odd require\.paths more appropriately -. -.br -Don\'t break on install if the man path is missing -. -.br -Support publishing or installing a folder or local tarball -. -.IP "\(bu" 4 -0\.1\.8: -Bugfixes -. -.br -Add start, stop, restart, and test commands -. -.IP "\(bu" 4 -0\.1\.9: -npm list enhancements -. -.br -fix the install bug -. -.IP "\(bu" 4 -0\.1\.10: -More errors found by Ryan Dahl and Kris Zyp -. -.br -Better uninstall and list behavior -. -.br -Docs for new developers\. -. -.br -Better tracking of ownership on the registry\. -. -.IP "\(bu" 4 -0\.1\.11: - Martyn Smith found a whole lot of bugs\. -. -.br - Make publish not die when the tarball is big\. -. -.br - "make uninstall" support -. -.IP "\(bu" 4 -0\.1\.12 \- 0\.1\.13: - Fix the downloading bug that was breaking the tarballs -. -.br - Update some docs -. -.IP "\(bu" 4 -0\.1\.14 \- 0\.1\.16: - Fix to stay in sync with node changes -. -.br - Put a special tag on link installs -. -.br - Modify semver comparison slightly -. -.br - add unpublish command -. -.br - Use the "drain" event properly for uploads -. -.br - Handle thrown errors -. -.br - Handle \.npmignore -. -.IP "\(bu" 4 -0\.1\.17: -Stabilization\. -. -.IP "\(bu" 4 -0\.1\.18: -Change a few default configurations -. -.br -Add test harness -. -.br -Default publish, install, and link to "\." if no arguments given -. -.IP "\(bu" 4 -0\.1\.19 \- 0\.1\.20: -Create a bunch of bugs -. -.br -Fix a bunch of bugs -. -.br -Some minor speed improvements -. -.IP "\(bu" 4 -0\.1\.21 \- 0\.1\.22: -Relative paths -. -.br -Support comments in package\.json -. -.br -Add owner name to ls output -. -.br -Add "owner" command to manage package owners -. -.br -Support hook scripts in \fB{root}/\.npm/\.hooks/\fR -. -.br -Initial support for config file relative to node executable -. -.br -Support for http proxies -. -.br -Documentation updates -. -.IP "\(bu" 4 -0\.1\.23: -update command \- This is huge\. -. -.br -Rollback for failed installations -. -.br -Install dependencies for link packages -. -.br -Silently read passwords for adduser -. -.br -Cascading configs: cli, env, user, global -. -.br -First pass at \fBnpm view\fR command -. -.IP "\(bu" 4 -0\.1\.24, 0\.1\.25: -Fix a bunch of things -. -.br -Cleanup, etc\. -. -.br -help via \-\-help, \-h, or \-? -. -.IP "\(bu" 4 -0\.1\.26: -"modules" hash in package\.json (Alex K\. Wolfe) -. -.br -Better "restart" command (Alex K Wolfe) -. -.br -Work on Cygwin -. -.br -Remove link packages properly -. -.br -Make several commands more parallel -. -.IP "\(bu" 4 -0\.1\.27: -Man pages handled with the "man" entry, or a "man" directory -. -.br -Install man pages in the "manroot" config dir -. -.br -Control log output with the "loglevel" config -. -.br -Support a "bin" directory of executables that get auto\-linked -. -.br -Un\-deprecate the "lib" directory\. -. -.br -Bug killing -. -.br -Split up the tar usage so it works on Solaris -. -.br -bundle command -. -.br -rebuild command -. -.IP "\(bu" 4 -0\.2\.0: -Lots more bug killing -. -.br -Various fixes found during the Node Knockout extravaganza -. -.br -Change all "name\-version" things to be "name@version" -. -.br -First allegedly "stable" release\. -. -.IP "\(bu" 4 -0\.2\.1: -Minor updates and bugfixes -. -.IP "" 0 - diff --git a/man/owner.1 b/man/owner.1 deleted file mode 100644 index 0af379a1f..000000000 --- a/man/owner.1 +++ /dev/null @@ -1,40 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-OWNER" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-owner\fR \-\- Manage package owners -. -.SH "SYNOPSIS" -. -.nf -npm owner ls <pkg> -npm owner add <user> <pkg> -npm owner rm <user> <pkg> -. -.fi -. -.SH "DESCRIPTION" -. -.IP "\(bu" 4 -ls: -List all the users who have access to modify a package and push new versions\. -Handy when you need to know who to bug for help\. -. -.IP "\(bu" 4 -add: -Add a new user as a maintainer of a package\. This user is enabled to modify -metadata, publish new versions, and add other owners\. -. -.IP "\(bu" 4 -rm: -Remove a user from the package owner list\. This immediately revokes their -privileges\. -. -.IP "" 0 -. -.P -Note that there is only one level of access\. Either you can modify a package, -or you can\'t\. Future versions may contain more fine\-grained access levels, but -that is not implemented at this time\. diff --git a/man/publish.1 b/man/publish.1 deleted file mode 100644 index 058231f9a..000000000 --- a/man/publish.1 +++ /dev/null @@ -1,33 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-PUBLISH" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-publish\fR \-\- Publish a package -. -.SH "SYNOPSIS" -. -.nf -npm publish <tarball> -npm publish <folder> -. -.fi -. -.SH "DESCRIPTION" -Publishes a package to the registry so that it can be installed by name\. -. -.IP "\(bu" 4 -\fB<folder>\fR: -A folder containing a package\.json file -. -.IP "\(bu" 4 -\fB<tarball>\fR: -A url or file path to a gzipped tar archive containing a single folder -with a package\.json file inside\. -. -.IP "" 0 -. -.P -Fails if the package name and version combination already exists in -the registry\. diff --git a/man/rebuild.1 b/man/rebuild.1 deleted file mode 100644 index 37054033a..000000000 --- a/man/rebuild.1 +++ /dev/null @@ -1,34 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-REBUILD" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-rebuild\fR \-\- Rebuild a package -. -.SH "SYNOPSIS" -. -.nf -npm rebuild [<name>[@<version>] [name[@<version>] \.\.\.]] -. -.fi -. -.IP "\(bu" 4 -\fB<name>\fR: -The package to rebuild -. -.IP "\(bu" 4 -\fB<version>\fR: -The version range to rebuild\. Any matching installed packages are rebuilt\. -. -.IP "" 0 -. -.SH "DESCRIPTION" -This command runs the \fBnpm build\fR command on the matched folders\. This is useful -when you install a new version of node, and must recompile all your C++ addons with -the new binary\. -. -.P -Regardless of the configuration settings, rebuild always sets \fBupdate\-dependents\fR -and \fBauto\-activate\fR to false, to minimize unexpected side effects\. It does not -change any state outside of the package\'s folder\. diff --git a/man/restart.1 b/man/restart.1 deleted file mode 100644 index 452ffddfb..000000000 --- a/man/restart.1 +++ /dev/null @@ -1,33 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-RESTART" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-restart\fR \-\- Start a package -. -.SH "SYNOPSIS" -. -.nf -npm restart <name>[@<version>] [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This runs a package\'s "restart" script, if one was provided\. -Otherwise it runs package\'s "stop" script, if one was provided, and then -the "start" script\. -. -.P -If no version is specified, then it restarts the "active" version\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm\-start(1) -. -.IP "\(bu" 4 -npm\-stop(1) -. -.IP "" 0 - diff --git a/man/rm.1 b/man/rm.1 deleted file mode 100644 index eb6409640..000000000 --- a/man/rm.1 +++ /dev/null @@ -1,39 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-UNINSTALL" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-uninstall\fR \-\- Remove a package -. -.SH "SYNOPSIS" -. -.nf -npm uninstall <name>[@<version> [<name>[@<version>] \.\.\.] -npm rm <name>[@<version> [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This uninstalls a package, completely removing everything installed for it\. If -it\'s currently active, then it will be deactivated first, unless the \fBauto\-deactivate\fR config setting is set to "false"\. If anything is -depending on it, then those must be uninstalled first\. -. -.P -If the version is omitted, then all versions of a package are removed\. -. -.P -\fB<version>\fR may in fact be a version range, so these commands are -acceptable: -. -.IP "" 4 -. -.nf -npm rm foo@\'1\.2\.3 \- 4\.8\.9\' -npm rm foo@\'>=1\.0\.0\' -npm rm foo@\'<2\.0\.3\' -. -.fi -. -.IP "" 0 - diff --git a/man/scripts.1 b/man/scripts.1 deleted file mode 100644 index 0af597d9a..000000000 --- a/man/scripts.1 +++ /dev/null @@ -1,191 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-SCRIPTS" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-scripts\fR \-\- How npm handles the "scripts" field -. -.SH "DESCRIPTION" -npm supports the "scripts" member of the package\.json script, for the -following scripts: -. -.IP "\(bu" 4 -preinstall: -Run BEFORE the package is installed -. -.IP "\(bu" 4 -install, postinstall: -Run AFTER the package is installed\. -. -.IP "\(bu" 4 -preactivate: -Run BEFORE the package is activated\. -. -.IP "\(bu" 4 -activate, postactivate: -Run AFTER the package has been activated\. -. -.IP "\(bu" 4 -predeactivate, deactivate: -Run BEFORE the package is deactivated\. -. -.IP "\(bu" 4 -postdeactivate: -Run AFTER the package is deactivated\. -. -.IP "\(bu" 4 -preuninstall, uninstall: -Run BEFORE the package is uninstalled\. -. -.IP "\(bu" 4 -postuninstall: -Run AFTER the package is uninstalled\. -. -.IP "\(bu" 4 -preupdate: -Run BEFORE the package is updated with the update command\. -. -.IP "\(bu" 4 -update, postupdate: -Run AFTER the package is updated with the update command\. -. -.IP "\(bu" 4 -preupdatedependencies: -Run BEFORE the package dependencies are pointed to the new version\. -. -.IP "\(bu" 4 -updatedependencies, postupdatedependencies: -Run AFTER the package dependencies are pointed to the new version\. -. -.IP "" 0 -. -.SH "ENVIRONMENT" -Package scripts run in an environment where many pieces of information are made available regarding the setup of npm and the current state of the process\. -. -.IP "\(bu" 4 -package\.json vars: -The package\.json fields are tacked onto the \fBnpm_package_\fR prefix\. So, for -instance, if you had \fB{"name":"foo", "version":"1\.2\.5"}\fR in your package\.json -file, then your package scripts would have the \fBnpm_package_name\fR environment -variable set to "foo", and the \fBnpm_package_version\fR set to "1\.2\.5" -. -.IP "\(bu" 4 -configuration vars: -Configuration parameters are put in the environment with the \fBnpm_config_\fR -prefix\. For instance, you can view the effective \fBroot\fR config by checking the \fBnpm_config_root\fR environment variable\. -. -.IP "\(bu" 4 -current lifecycle event: -Lastly, the \fBnpm_lifecycle_event\fR environment variable is set to whichever -stage of the cycle is being executed\. So, you could have a single script used -for different parts of the process which switches based on what\'s currently -happening\. -. -.IP "" 0 -. -.P -Objects are flattened following this format, so if you had \fB{"scripts":{"install":"foo\.js"}}\fR in your package\.json, then you\'d see this -in the script: -. -.IP "" 4 -. -.nf -process\.env\.npm_package_scripts_install === "foo\.js" -. -.fi -. -.IP "" 0 -. -.SH "EXAMPLES" -For example, if your package\.json contains this: -. -.IP "" 4 -. -.nf -{ "scripts" : - { "install" : "scripts/install\.js" - , "postinstall" : "scripts/install\.js" - , "activate" : "scripts/install\.js" - , "uninstall" : "scripts/uninstall\.js" - } -} -. -.fi -. -.IP "" 0 -. -.P -then the \fBscripts/install\.js\fR will be called for the install, post\-install, -and activate stages of the lifecycle, and the \fBscripts/uninstall\.js\fR would be -called when the package is uninstalled\. Since \fBscripts/install\.js\fR is running -for three different phases, it would be wise in this case to look at the \fBnpm_lifecycle_event\fR environment variable\. -. -.P -If you want to run a make command, you can do so\. This works just fine: -. -.IP "" 4 -. -.nf -{ "scripts" : - { "preinstall" : "\./configure" - , "install" : "make && make install" - , "test" : "make test" - } -} -. -.fi -. -.IP "" 0 -. -.SH "EXITING" -Scripts are run by passing the line as a script argument to \fBsh\fR\|\. -. -.P -If the script exits with a code other than 0, then this will abort the -process\. -. -.P -Note that these script files don\'t have to be nodejs or even javascript -programs\. They just have to be some kind of executable file\. -. -.SH "HOOK SCRIPTS" -If you want to run a specific script at a specific lifecycle event for ALL -packages, then you can use a hook script\. -. -.P -Place an executable file at \fB{root}/\.npm/\.hooks/{eventname}\fR, and it\'ll get -run for all packages when they are going through that point in the package -lifecycle\. -. -.P -Hook scripts are run exactly the same way as package\.json scripts\. That is, -they are in a separate child process, with the env described above\. -. -.SH "BEST PRACTICES" -. -.IP "\(bu" 4 -Don\'t exit with a non\-zero error code unless you \fIreally\fR mean it\. -Except for uninstall/deactivate scripts, this will cause the npm action -to fail, and potentially be rolled back\. If the failure is minor or -only will prevent some optional features, then it\'s better to just -print a warning and exit successfully\. -. -.IP "\(bu" 4 -Try not to use scripts to do what npm can do for you\. Read through \fBnpm help json\fR to see all the things that you can specify and enable -by simply describing your package appropriately\. In general, this will -lead to a more robust and consistent state\. -. -.IP "\(bu" 4 -Inspect the env to determine where to put things\. For instance, if -the \fBnpm_config_binroot\fR environ is set to \fB/home/user/bin\fR, then don\'t -try to install executables into \fB/usr/local/bin\fR\|\. The user probably -set it up that way for a reason\. -. -.IP "\(bu" 4 -Don\'t prefix your script commands with "sudo"\. If root permissions are -required for some reason, then it\'ll fail with that error, and the user -will sudo the npm command in question\. -. -.IP "" 0 - diff --git a/man/start.1 b/man/start.1 deleted file mode 100644 index ea7fc6f4e..000000000 --- a/man/start.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-START" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-start\fR \-\- Start a package -. -.SH "SYNOPSIS" -. -.nf -npm start <name>[@<version>] [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This runs a package\'s "start" script, if one was provided\. -. -.P -If no version is specified, then it starts the "active" version\. diff --git a/man/stop.1 b/man/stop.1 deleted file mode 100644 index 33912ec20..000000000 --- a/man/stop.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-STOP" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-stop\fR \-\- Stop a package -. -.SH "SYNOPSIS" -. -.nf -npm stop <name>[@<version>] [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This runs a package\'s "stop" script, if one was provided\. -. -.P -If no version is specified, then it stops the "active" version\. diff --git a/man/tag.1 b/man/tag.1 deleted file mode 100644 index 6a6c82bc6..000000000 --- a/man/tag.1 +++ /dev/null @@ -1,23 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-TAG" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-tag\fR \-\- Tag a published version -. -.SH "SYNOPSIS" -. -.nf -npm tag packagename@1\.2\.3 tagname -. -.fi -. -.SH "DESCRIPTION" -Tags the specified version of "packagename" with the specified "tagname"\. -. -.P -The only tags with special significance are "stable", which is the version -that gets installed by default when no other tag or version number is -specified, and "latest", which always points to the most recently uploaded -version of a package\. diff --git a/man/test.1 b/man/test.1 deleted file mode 100644 index 6be6c5004..000000000 --- a/man/test.1 +++ /dev/null @@ -1,20 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-TEST" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-test\fR \-\- Test a package -. -.SH "SYNOPSIS" -. -.nf - npm test <name>[@<version>] [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This runs a package\'s "test" script, if one was provided\. -. -.P -If no version is specified, then it tests the "active" version\. diff --git a/man/uninstall.1 b/man/uninstall.1 deleted file mode 100644 index eb6409640..000000000 --- a/man/uninstall.1 +++ /dev/null @@ -1,39 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-UNINSTALL" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-uninstall\fR \-\- Remove a package -. -.SH "SYNOPSIS" -. -.nf -npm uninstall <name>[@<version> [<name>[@<version>] \.\.\.] -npm rm <name>[@<version> [<name>[@<version>] \.\.\.] -. -.fi -. -.SH "DESCRIPTION" -This uninstalls a package, completely removing everything installed for it\. If -it\'s currently active, then it will be deactivated first, unless the \fBauto\-deactivate\fR config setting is set to "false"\. If anything is -depending on it, then those must be uninstalled first\. -. -.P -If the version is omitted, then all versions of a package are removed\. -. -.P -\fB<version>\fR may in fact be a version range, so these commands are -acceptable: -. -.IP "" 4 -. -.nf -npm rm foo@\'1\.2\.3 \- 4\.8\.9\' -npm rm foo@\'>=1\.0\.0\' -npm rm foo@\'<2\.0\.3\' -. -.fi -. -.IP "" 0 - diff --git a/man/unpublish.1 b/man/unpublish.1 deleted file mode 100644 index 27634e7d3..000000000 --- a/man/unpublish.1 +++ /dev/null @@ -1,22 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-UNPUBLISH" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-unpublish\fR \-\- Remove a package from the registry -. -.SH "SYNOPSIS" -. -.nf -npm unpublish <name>[@<version>] -. -.fi -. -.SH "DESCRIPTION" -This removes a package version from the registry, deleting its -entry and removing the tarball\. -. -.P -If no version is specified, or if all versions are removed then -the root package entry is removed from the registry entirely\. diff --git a/man/update.1 b/man/update.1 deleted file mode 100644 index 08d4c5804..000000000 --- a/man/update.1 +++ /dev/null @@ -1,33 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-UPDATE" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-update\fR \-\- Update a package -. -.SH "SYNOPSIS" -. -.nf -npm update [<pkg> [<pkg> \.\.\.]] -. -.fi -. -.SH "DESCRIPTION" -This command will update all the packages listed to the latest version -(specified by the \fBtag\fR config), as well as updating any dependent -packages to use the new version, if possible\. -. -.P -Additionally, it will activate the new version, and delete any old versions, if -safe to do so -. -.P -If the \fBupdate\-dependents\fR configuration parameter is set to \fB"true"\fR, then -packages will always be updated when they are installed, if they are the newest -version\. -. -.P -If the \fBupdate\-dependents\fR configuration parameter is set to \fB"always"\fR, then -packages will be updated when they are installed, even if to do so would be a -downgrade\. diff --git a/man/view.1 b/man/view.1 deleted file mode 100644 index f4550dde0..000000000 --- a/man/view.1 +++ /dev/null @@ -1,22 +0,0 @@ -.\" Generated with Ronnjs/v0.1 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-VIEW" "1" "September 2010" "" "" -. -.SH "NAME" -\fBnpm-view\fR \-\- View registry info -. -.SH "SYNOPSIS" -. -.nf -npm view [<pkg> [<pkg> \.\.\.]] -. -.fi -. -.SH "DESCRIPTION" -This command just spits out the data that is on the npm registry for a given -package or packages\. -. -.P -You could also go to the registry url directly in your web browser to see the -same information\. |