Skip to content

Commit

Permalink
Change to make index build properly
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 8, 2011
1 parent 8fdd60d commit 55d2677
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions scripts/doc-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,31 @@ version=$(npm -v)
mkdir -p $(dirname $dest)

case $dest in
*.html)
*.html)
(cat html/dochead.html && \
./node_modules/.bin/ronn -f $src && \
cat html/docfoot.html )\
| sed "s|@NAME@|$name|g" \
| sed "s|@DATE@|$date|g" \
| 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-([^\)]+)\(1\)/<a href="\1.html">npm \1<\/a>/g' \
| perl -pi -e 's/npm\(1\)/<a href="npm.html">npm<\/a>/g' \
| perl -pi -e 's/npm-npm/npm/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' \
| perl -pi -e 's/README/<a href="README.html">README<\/a>/g' \
> $dest
exit $?
;;
*.1)
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' \
> $dest
exit $?
;;
*)
echo "Invalid destination type: $dest" >&2
exit 1
;;
exit $?
;;
*)
echo "Invalid destination type: $dest" >&2
exit 1
;;
esac

0 comments on commit 55d2677

Please sign in to comment.