diff options
author | isaacs <i@izs.me> | 2011-09-25 07:58:50 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-09-25 07:58:50 +0400 |
commit | 308dd4254715f7845a1d2f84b05bc51cfb018890 (patch) | |
tree | b078d210051b6eacbeff16cb56d2fd060400a090 /scripts | |
parent | a726b94c66d918a276c1acd8112ce4659809d152 (diff) | |
parent | 12e22fb2709f73fa9300ea81e3ac5b5620870492 (diff) |
Merge branch 'api-doc' into api-doc2
Conflicts:
Makefile
doc/cli/find.md
lib/help.js
man/man1/adduser.1
man/man1/bin.1
man/man1/build.1
man/man1/bundle.1
man/man1/cache.1
man/man1/changelog.1
man/man1/coding-style.1
man/man1/completion.1
man/man1/config.1
man/man1/developers.1
man/man1/docs.1
man/man1/faq.1
man/man1/find.1
man/man1/folders.1
man/man1/get.1
man/man1/global.1
man/man1/help-search.1
man/man1/home.1
man/man1/init.1
man/man1/install.1
man/man1/json.1
man/man1/link.1
man/man1/ln.1
man/man1/npm.1
man/man1/outdated.1
man/man1/prefix.1
man/man1/registry.1
man/man1/removing-npm.1
man/man1/rm.1
man/man1/root.1
man/man1/run-script.1
man/man1/scripts.1
man/man1/search.1
man/man1/semver.1
man/man1/set.1
man/man1/tag.1
man/man1/uninstall.1
man/man1/update.1
man/man1/version.1
man/man1/whoami.1
man/man3/author.3
man/man3/deprecate.3
man/man3/edit.3
man/man3/explore.3
man/man3/list.3
man/man3/ls.3
man/man3/owner.3
man/man3/pack.3
man/man3/prune.3
man/man3/publish.3
man/man3/rebuild.3
man/man3/restart.3
man/man3/start.3
man/man3/stop.3
man/man3/submodule.3
man/man3/test.3
man/man3/unpublish.3
man/man3/view.3
npm.js
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/doc-build.sh | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh index 218425de1..9c8fbee64 100755 --- a/scripts/doc-build.sh +++ b/scripts/doc-build.sh @@ -17,6 +17,16 @@ version=$(node cli.js -v) mkdir -p $(dirname $dest) case $dest in + *.[13]) + ./node_modules/.bin/ronn --roff $src \ + | sed "s|@VERSION@|$version|g" \ + | perl -pi -e 's/npm\\-([^\(]*)\(1\)/npm help \1/g' \ + | perl -pi -e 's/npm\\-([^\(]*)\(3\)/npm apihelp \1/g' \ + | perl -pi -e 's/npm\(1\)/npm help npm/g' \ + | perl -pi -e 's/npm\(3\)/npm apihelp npm/g' \ + > $dest + exit $? + ;; *.html) (cat html/dochead.html && \ ./node_modules/.bin/ronn -f $src && \ @@ -26,18 +36,11 @@ case $dest in | sed "s|@VERSION@|$version|g" \ | perl -pi -e 's/<h1>npm(-?[^\(]*\([0-9]\)) -- (.*?)<\/h1>/<h1>npm\1<\/h1> <p>\2<\/p>/g' \ | perl -pi -e 's/npm-npm/npm/g' \ - | perl -pi -e 's/([^"-])(npm-)?README(\(1\))?/\1<a href="README.html">README<\/a>/g' \ - | perl -pi -e 's/<title><a href="README.html">README<\/a><\/title>/<title>README<\/title>/g' \ - | perl -pi -e 's/([^"-])npm-([^\(]+)\(1\)/\1<a href="\2.html">\2<\/a>/g' \ - | perl -pi -e 's/([^"-])npm\(1\)/\1<a href="npm.html">npm<\/a>/g' \ - > $dest - exit $? - ;; - *.1) - ./node_modules/.bin/ronn --roff $src \ - | sed "s|@VERSION@|$version|g" \ - | perl -pi -e 's/npm\\-([^\(]*)\([0-9]\)/npm help \1/g' \ - | perl -pi -e 's/npm\([0-9]\)/npm help npm/g' \ + | perl -pi -e 's/([^"-])(npm-)?README(\(1\))?/\1<a href="..\/doc\/README.html">README<\/a>/g' \ + | perl -pi -e 's/<title><a href="..\/doc\/README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -pi -e 's/([^"-])npm-([^\(]+)\(1\)/\1<a href="..\/doc\/\2.html">\2<\/a>/g' \ + | perl -pi -e 's/([^"-])npm-([^\(]+)\(3\)/\1<a href="..\/api\/\2.html">\2<\/a>/g' \ + | perl -pi -e 's/([^"-])npm\(1\)/\1<a href="..\/doc\/npm.html">npm<\/a>/g' \ > $dest exit $? ;; |