Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
make doc
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 8, 2011
1 parent a6a0586 commit f473273
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 51 deletions.
18 changes: 17 additions & 1 deletion man1/changelog.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1 .\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/ .\" http://github.com/kapouer/ronnjs/
. .
.TH "NPM\-CHANGELOG" "1" "January 2011" "" "" .TH "NPM\-CHANGELOG" "1" "February 2011" "" ""
. .
.SH "NAME" .SH "NAME"
\fBnpm-changelog\fR \-\- Changes \fBnpm-changelog\fR \-\- Changes
Expand Down Expand Up @@ -497,5 +497,21 @@ Dependency info in lifecycle scripts\.
.br .br
More data validation\. More data validation\.
. .
.IP "\(bu" 4
0\.2\.15 \- 0\.2\.17:
Added "\-\-force" for publish
.
.br
Support argless "unpublish" and "uninstall" in package dirs
.
.br
Document future stuff
.
.br
Remove support for "modules" hash
.
.br
Read package defaults when reading json
.
.IP "" 0 .IP "" 0


13 changes: 1 addition & 12 deletions man1/faq.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1 .\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/ .\" http://github.com/kapouer/ronnjs/
. .
.TH "NPM\-FAQ" "1" "January 2011" "" "" .TH "NPM\-FAQ" "1" "February 2011" "" ""
. .
.SH "NAME" .SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions \fBnpm-faq\fR \-\- Frequently Asked Questions
Expand Down Expand Up @@ -50,17 +50,6 @@ Arguments are greps\. \fBnpm ls jsdom\fR shows jsdom packages\.
You can also update all outdated packages by doing \fBnpm update\fR without You can also update all outdated packages by doing \fBnpm update\fR without
any arguments\. any arguments\.
. .
.SH "Why does it yell at me when I do `sudo npm install \.\.\.`?"
Because you\'re not supposed to\.
.
.P
It is not safe to install things with sudo at this time\. See this
bug for discussion on why this is and how it will be changed in an
upcoming version:
.
.P
\fIhttps://github\.com/isaacs/npm/issues/issue/294\fR
.
.SH "What is a `package`?" .SH "What is a `package`?"
A package is: A package is:
. .
Expand Down
44 changes: 6 additions & 38 deletions man1/json.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1 .\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/ .\" http://github.com/kapouer/ronnjs/
. .
.TH "NPM\-JSON" "1" "January 2011" "" "" .TH "NPM\-JSON" "1" "February 2011" "" ""
. .
.SH "NAME" .SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling \fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
Expand Down Expand Up @@ -132,7 +132,7 @@ entire package folder in the tarball, but you may want to only include
specific things\. specific things\.
. .
.P .P
If you specify modules, bins, or man pages, then those will be If you specify bins or man pages, then those will be
automatically added to the files array, even if they would not automatically added to the files array, even if they would not
ordinarily be included\. ordinarily be included\.
. .
Expand Down Expand Up @@ -213,38 +213,6 @@ would be the same as this:
. .
.IP "" 0 .IP "" 0
. .
.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\. Doing \fBrequire("foo/quux")\fR would return the module at \fB\|\./quux\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" .SH "man"
Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find\. Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find\.
. .
Expand Down Expand Up @@ -312,13 +280,13 @@ you\'ll see that it has directories for doc, lib, and man\.
In the future, this information may be used in other creative ways\. In the future, this information may be used in other creative ways\.
. .
.SS "directories\.lib" .SS "directories\.lib"
If you specify a "lib" directory, and do not supply a modules hash, then the lib If you specify a "lib" directory, then the lib
folder will be walked and any \fI\|\.js or \fR\|\.node files found will be exposed as a folder will be walked and any \fI\|\.js or \fR\|\.node files found will be exposed as a
default module hash\. default module hash\.
. .
.P .P
Providing an explicit modules hash is encouraged over exposing the entire lib \fBThe lib directory mapping will be deprecated soon\. Please do not rely
folder\. on it\.\fR
. .
.SS "directories\.bin" .SS "directories\.bin"
If you specify a "bin" directory, then all the files in that folder will be used If you specify a "bin" directory, then all the files in that folder will be used
Expand Down Expand Up @@ -426,7 +394,7 @@ configs\.
. .
.SH "dependencies" .SH "dependencies"
Dependencies are specified with a simple hash of package name to version 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 range\. The version range is EITHER a string which has one or more
space\-separated descriptors, OR a range like "fromVersion \- toVersion" space\-separated descriptors, OR a range like "fromVersion \- toVersion"
. .
.P .P
Expand Down

0 comments on commit f473273

Please sign in to comment.