Permalink
Browse files

folder structure change

doc/{cli,api}
man/{man1,man3}
  • Loading branch information...
1 parent 001b6d0 commit 5021c4dca88278bc7e57dab3bc87b4656086028a @isaacs isaacs committed Aug 23, 2011
Showing with 48 additions and 31 deletions.
  1. +12 −18 Makefile
  2. 0 {api-doc → doc/api}/author.md
  3. 0 {api-doc → doc/api}/bin.md
  4. 0 {api-doc → doc/api}/commands.md
  5. 0 {api-doc → doc/api}/config.md
  6. 0 {api-doc → doc/api}/deprecate.md
  7. 0 {api-doc → doc/api}/docs.md
  8. 0 {api-doc → doc/api}/edit.md
  9. 0 {api-doc → doc/api}/explore.md
  10. 0 {api-doc → doc/api}/find.md
  11. 0 {api-doc → doc/api}/get.md
  12. 0 {api-doc → doc/api}/help-search.md
  13. 0 {api-doc → doc/api}/home.md
  14. 0 {api-doc → doc/api}/init.md
  15. 0 {api-doc → doc/api}/install.md
  16. 0 {api-doc → doc/api}/link.md
  17. 0 {api-doc → doc/api}/list.md
  18. 0 {api-doc → doc/api}/ln.md
  19. 0 {api-doc → doc/api}/load.md
  20. 0 {api-doc → doc/api}/ls.md
  21. 0 {api-doc → doc/api}/npm.md
  22. 0 {api-doc → doc/api}/outdated.md
  23. 0 {api-doc → doc/api}/owner.md
  24. 0 {api-doc → doc/api}/pack.md
  25. 0 {api-doc → doc/api}/prefix.md
  26. 0 {api-doc → doc/api}/prune.md
  27. 0 {api-doc → doc/api}/publish.md
  28. 0 {api-doc → doc/api}/rebuild.md
  29. 0 {api-doc → doc/api}/restart.md
  30. 0 {api-doc → doc/api}/rm.md
  31. 0 {api-doc → doc/api}/root.md
  32. 0 {api-doc → doc/api}/run-script.md
  33. 0 {api-doc → doc/api}/search.md
  34. 0 {api-doc → doc/api}/set.md
  35. 0 {api-doc → doc/api}/start.md
  36. 0 {api-doc → doc/api}/stop.md
  37. 0 {api-doc → doc/api}/submodule.md
  38. 0 {api-doc → doc/api}/tag.md
  39. 0 {api-doc → doc/api}/test.md
  40. 0 {api-doc → doc/api}/uninstall.md
  41. 0 {api-doc → doc/api}/unpublish.md
  42. 0 {api-doc → doc/api}/update.md
  43. 0 {api-doc → doc/api}/version.md
  44. 0 {api-doc → doc/api}/view.md
  45. 0 {api-doc → doc/api}/whoami.md
  46. 0 doc/{ → cli}/adduser.md
  47. 0 doc/{ → cli}/author.md
  48. 0 doc/{ → cli}/bin.md
  49. 0 doc/{ → cli}/build.md
  50. 0 doc/{ → cli}/bundle.md
  51. 0 doc/{ → cli}/cache.md
  52. 0 doc/{ → cli}/changelog.md
  53. 0 doc/{ → cli}/coding-style.md
  54. 0 doc/{ → cli}/completion.md
  55. 0 doc/{ → cli}/config.md
  56. 0 doc/{ → cli}/deprecate.md
  57. 0 doc/{ → cli}/developers.md
  58. 0 doc/{ → cli}/docs.md
  59. 0 doc/{ → cli}/edit.md
  60. 0 doc/{ → cli}/explore.md
  61. 0 doc/{ → cli}/faq.md
  62. 0 doc/{ → cli}/find.md
  63. 0 doc/{ → cli}/folders.md
  64. 0 doc/{ → cli}/get.md
  65. 0 doc/{ → cli}/global.md
  66. 0 doc/{ → cli}/help-search.md
  67. 0 doc/{ → cli}/home.md
  68. 0 doc/{ → cli}/init.md
  69. 0 doc/{ → cli}/install.md
  70. 0 doc/{ → cli}/json.md
  71. 0 doc/{ → cli}/link.md
  72. 0 doc/{ → cli}/list.md
  73. 0 doc/{ → cli}/ln.md
  74. 0 doc/{ → cli}/ls.md
  75. 0 doc/{ → cli}/npm.md
  76. 0 doc/{ → cli}/outdated.md
  77. 0 doc/{ → cli}/owner.md
  78. 0 doc/{ → cli}/pack.md
  79. 0 doc/{ → cli}/prefix.md
  80. 0 doc/{ → cli}/prune.md
  81. 0 doc/{ → cli}/publish.md
  82. 0 doc/{ → cli}/rebuild.md
  83. 0 doc/{ → cli}/registry.md
  84. 0 doc/{ → cli}/removing-npm.md
  85. 0 doc/{ → cli}/restart.md
  86. 0 doc/{ → cli}/rm.md
  87. 0 doc/{ → cli}/root.md
  88. 0 doc/{ → cli}/run-script.md
  89. 0 doc/{ → cli}/scripts.md
  90. 0 doc/{ → cli}/search.md
  91. 0 doc/{ → cli}/semver.md
  92. 0 doc/{ → cli}/set.md
  93. 0 doc/{ → cli}/start.md
  94. 0 doc/{ → cli}/stop.md
  95. 0 doc/{ → cli}/submodule.md
  96. 0 doc/{ → cli}/tag.md
  97. 0 doc/{ → cli}/test.md
  98. 0 doc/{ → cli}/uninstall.md
  99. 0 doc/{ → cli}/unpublish.md
  100. 0 doc/{ → cli}/update.md
  101. 0 doc/{ → cli}/version.md
  102. 0 doc/{ → cli}/view.md
  103. 0 doc/{ → cli}/whoami.md
  104. +1 −1 lib/help-search.js
  105. +3 −3 lib/help.js
  106. 0 { → man}/man1/adduser.1
  107. 0 { → man}/man1/author.1
  108. 0 { → man}/man1/bin.1
  109. 0 { → man}/man1/build.1
  110. 0 { → man}/man1/bundle.1
  111. 0 { → man}/man1/cache.1
  112. 0 { → man}/man1/changelog.1
  113. 0 { → man}/man1/coding-style.1
  114. 0 { → man}/man1/completion.1
  115. 0 { → man}/man1/config.1
  116. 0 { → man}/man1/deprecate.1
  117. 0 { → man}/man1/developers.1
  118. 0 { → man}/man1/docs.1
  119. 0 { → man}/man1/edit.1
  120. 0 { → man}/man1/explore.1
  121. +24 −7 { → man}/man1/faq.1
  122. 0 { → man}/man1/find.1
  123. 0 { → man}/man1/folders.1
  124. 0 { → man}/man1/get.1
  125. 0 { → man}/man1/global.1
  126. 0 { → man}/man1/help-search.1
  127. 0 { → man}/man1/home.1
  128. 0 { → man}/man1/init.1
  129. 0 { → man}/man1/install.1
  130. 0 { → man}/man1/json.1
  131. 0 { → man}/man1/link.1
  132. 0 { → man}/man1/list.1
  133. 0 { → man}/man1/ln.1
  134. 0 { → man}/man1/ls.1
  135. 0 { → man}/man1/npm.1
  136. 0 { → man}/man1/outdated.1
  137. 0 { → man}/man1/owner.1
  138. 0 { → man}/man1/pack.1
  139. 0 { → man}/man1/prefix.1
  140. 0 { → man}/man1/prune.1
  141. 0 { → man}/man1/publish.1
  142. 0 { → man}/man1/rebuild.1
  143. 0 { → man}/man1/registry.1
  144. 0 { → man}/man1/removing-npm.1
  145. 0 { → man}/man1/restart.1
  146. 0 { → man}/man1/rm.1
  147. 0 { → man}/man1/root.1
  148. 0 { → man}/man1/run-script.1
  149. +7 −1 { → man}/man1/scripts.1
  150. 0 { → man}/man1/search.1
  151. 0 { → man}/man1/semver.1
  152. 0 { → man}/man1/set.1
  153. 0 { → man}/man1/start.1
  154. 0 { → man}/man1/stop.1
  155. 0 { → man}/man1/submodule.1
  156. 0 { → man}/man1/tag.1
  157. 0 { → man}/man1/test.1
  158. 0 { → man}/man1/uninstall.1
  159. 0 { → man}/man1/unpublish.1
  160. 0 { → man}/man1/update.1
  161. 0 { → man}/man1/version.1
  162. 0 { → man}/man1/view.1
  163. 0 { → man}/man1/whoami.1
  164. 0 { → man}/man3/author.3
  165. 0 { → man}/man3/bin.3
  166. 0 { → man}/man3/commands.3
  167. 0 { → man}/man3/config.3
  168. 0 { → man}/man3/deprecate.3
  169. 0 { → man}/man3/docs.3
  170. 0 { → man}/man3/edit.3
  171. 0 { → man}/man3/explore.3
  172. 0 { → man}/man3/find.3
  173. 0 { → man}/man3/get.3
  174. 0 { → man}/man3/help-search.3
  175. 0 { → man}/man3/home.3
  176. 0 { → man}/man3/init.3
  177. 0 { → man}/man3/install.3
  178. 0 { → man}/man3/link.3
  179. 0 { → man}/man3/list.3
  180. 0 { → man}/man3/ln.3
  181. 0 { → man}/man3/load.3
  182. 0 { → man}/man3/ls.3
  183. 0 { → man}/man3/npm.3
  184. 0 { → man}/man3/outdated.3
  185. 0 { → man}/man3/owner.3
  186. 0 { → man}/man3/pack.3
  187. 0 { → man}/man3/prefix.3
  188. 0 { → man}/man3/prune.3
  189. 0 { → man}/man3/publish.3
  190. 0 { → man}/man3/rebuild.3
  191. 0 { → man}/man3/restart.3
  192. 0 { → man}/man3/rm.3
  193. 0 { → man}/man3/root.3
  194. 0 { → man}/man3/run-script.3
  195. 0 { → man}/man3/search.3
  196. 0 { → man}/man3/set.3
  197. 0 { → man}/man3/start.3
  198. 0 { → man}/man3/stop.3
  199. 0 { → man}/man3/submodule.3
  200. 0 { → man}/man3/tag.3
  201. 0 { → man}/man3/test.3
  202. 0 { → man}/man3/uninstall.3
  203. 0 { → man}/man3/unpublish.3
  204. 0 { → man}/man3/update.3
  205. 0 { → man}/man3/version.3
  206. 0 { → man}/man3/view.3
  207. 0 { → man}/man3/whoami.3
  208. +1 −1 package.json
View
@@ -1,12 +1,12 @@
SHELL = bash
-cli_docs = $(shell find doc -name '*.md' \
+cli_docs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.1|g' \
- |sed 's|doc/|man1/|g' )
+ |sed 's|doc/cli/|man/man1/|g' )
-api_docs = $(shell find api-doc -name '*.md' \
+api_docs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.3|g' \
- |sed 's|api-doc/|man3/|g' )
+ |sed 's|doc/api/|man/man3/|g' )
cli_doc_subfolders = $(shell find doc -type d \
|sed 's|doc/|man1/|g' )
@@ -41,31 +41,25 @@ clean: uninstall
uninstall: submodules
node cli.js rm npm -g -f
-man: man1 man3
+doc: man
-man1: $(cli_doc_subfolders)
- [ -d man1 ] || mkdir -p man1
+man: man/man1 man/man3
-man3: $(api_doc_subfolders)
- [ -d man3 ] || mkdir -p man3
+man/man1: $(cli_docs)
+ [ -d man/man1 ] || mkdir -p man/man1
-doc: man1 $(cli_docs) man3 $(api_docs)
+man/man3: $(api_docs)
+ [ -d man/man3 ] || mkdir -p man/man3
# use `npm install ronn` for this to work.
-man1/%.1: doc/%.md
+man/man1/%.1: doc/cli/%.md
@[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
./node_modules/.bin/ronn --roff $< > $@
-man1/%/: doc/%/
- @[ -d $@ ] || mkdir -p $@
-
-man3/%.3: api-doc/%.md
+man/man3/%.3: doc/api/%.md
@[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
./node_modules/.bin/ronn --roff $< > $@
-man3/%/: api-doc/%/
- @[ -d $@ ] || mkdir -p $@
-
test: submodules
node cli.js test
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -5,7 +5,7 @@ var fs = require("graceful-fs")
, output = require("./utils/output.js")
, path = require("path")
, asyncMap = require("slide").asyncMap
- , docsPath = path.join(__dirname, "..", "doc")
+ , docsPath = path.join(__dirname, "..", "doc", "cli")
, log = require("./utils/log.js")
, npm = require("../npm.js")
View
@@ -26,13 +26,13 @@ function help (args, cb) {
npm.config.set("loglevel", "silent")
return output.write(npm.commands[section].usage, cb)
}
- var section_path = path.join(__dirname, "../man1/"+section+".1")
+ var section_path = path.join(__dirname, "../man/man1/"+section+".1")
return fs.stat
( section_path
, function (e, o) {
if (e) return npm.commands["help-search"](args, cb)
- var manpath = path.join(__dirname, "..")
+ var manpath = path.join(__dirname, "..", "man")
, env = {}
Object.keys(process.env).forEach(function (i) { env[i] = process.env[i] })
env.MANPATH = manpath
@@ -85,7 +85,7 @@ function wrap (arr) {
}
function getSections(cb) {
- fs.readdir(path.join(__dirname, "../man1/"), function (er, files) {
+ fs.readdir(path.join(__dirname, "../man/man1/"), function (er, files) {
if (er) return cb(er)
var sectionList = files.concat("help.1")
.filter(function (s) { return s.match(/\.1$/) })
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -156,6 +156,9 @@ e) a \fB<name>@<tag>\fR that points to (d)
.IP "\(bu" 4
f) a \fB<name>\fR that has a "latest" tag satisfying (e)
.
+.IP "\(bu" 4
+g) a \fBgit\fR url that, when cloned, results in (a)\.
+.
.IP "" 0
.
.P
@@ -164,6 +167,25 @@ benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b)\.
.
+.P
+Git urls can be of the form:
+.
+.IP "" 4
+.
+.nf
+git://github\.com/user/project\.git#commit\-ish
+git+ssh://user@hostname:project\.git#commit\-ish
+git+http://user@hostname/project/blah\.git#commit\-ish
+git+https://user@hostname/project/blah\.git#commit\-ish
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
+an argument to \fBgit checkout\fR\|\. The default is \fBmaster\fR\|\.
+.
.SH "How do I install node with npm?"
You don\'t\. Try one of these:
.
@@ -190,13 +212,8 @@ To set up your own private registry, check out \fBnpm help registry\fR\|\.
.
.SH "Can I list a url as a dependency?"
Yes\. It should be a url to a gzipped tarball containing a single folder
-that has a package\.json in its root\. (See "what is a package?" above\.)
-.
-.SH "OK, but can I list a git repo as a dependency?"
-No\.
-.
-.P
-However, you can list a url as a dependency\.
+that has a package\.json in its root, or a git url\.
+(See "what is a package?" above\.)
.
.SH "How do I symlink to a dev folder so I don\'t have to keep re\-installing?"
See \fBnpm help link\fR
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "July 2011" "" ""
+.TH "NPM\-SCRIPTS" "1" "August 2011" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
@@ -83,6 +83,12 @@ default the \fBpreinstall\fR command to compile using node\-waf\.
.
.IP "" 0
.
+.SH "USER"
+If npm was invoked with root privileges, then it will change the uid to
+the user account or uid specified by the \fBuser\fR config, which defaults
+to \fBnobody\fR\|\. Set the \fBunsafe\-perm\fR flag to run scripts with root
+privileges\.
+.
.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -15,7 +15,7 @@
, "web" : "http://github.com/isaacs/npm/issues"
}
, "directories" : { "doc" : "./doc"
- , "man" : "./man1"
+ , "man" : "./man"
, "lib" : "./lib"
, "bin" : "./bin"
}

0 comments on commit 5021c4d

Please sign in to comment.