Use marked instead of ronn for html docs

This commit is contained in:
isaacs
2014-05-01 17:03:53 -07:00
parent 92dd730ebd
commit 972e66164e
2 changed files with 3 additions and 2 deletions

View File

@@ -138,6 +138,7 @@
"which"
],
"devDependencies": {
"marked": "~0.3.2",
"npm-registry-mock": "~0.6.3",
"ronn": "~0.3.6",
"tap": "~0.4.9"

View File

@@ -55,13 +55,13 @@ case $dest in
*.html)
url=${dest/html\//}
(cat html/dochead.html && \
./node_modules/.bin/ronn -f $src &&
cat $src | ./node_modules/.bin/marked &&
cat html/docfoot.html)\
| sed "s|@NAME@|$name|g" \
| sed "s|@DATE@|$date|g" \
| sed "s|@URL@|$url|g" \
| sed "s|@VERSION@|$version|g" \
| perl -pi -e 's/<h1>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/<h1>\1<\/h1> <p>\2<\/p>/g' \
| perl -pi -e 's/<h1([^>]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/<h1>\2<\/h1> <p>\3<\/p>/g' \
| perl -pi -e 's/npm-npm/npm/g' \
| perl -pi -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1<a href="..\/..\/doc\/README.html">README<\/a>/g' \
| perl -pi -e 's/<title><a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \