Add 'make toc' to re-generate the TOC in the README (see #429)
This commit is contained in:
parent
61f8af9b5c
commit
604ff1e88b
2 changed files with 7 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -46,7 +46,7 @@ cutarelease: versioncheck check
|
||||||
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
|
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs:
|
docs: toc
|
||||||
@[[ `which ronn` ]] || (echo "No 'ronn' on your PATH. Install with 'gem install ronn'" && exit 2)
|
@[[ `which ronn` ]] || (echo "No 'ronn' on your PATH. Install with 'gem install ronn'" && exit 2)
|
||||||
mkdir -p man/man1
|
mkdir -p man/man1
|
||||||
ronn --style=toc --manual="bunyan manual" --date=$(shell git log -1 --pretty=format:%cd --date=short) --roff --html docs/bunyan.1.ronn
|
ronn --style=toc --manual="bunyan manual" --date=$(shell git log -1 --pretty=format:%cd --date=short) --roff --html docs/bunyan.1.ronn
|
||||||
|
@ -54,6 +54,11 @@ docs:
|
||||||
python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace("</body>", """<a href="https://github.com/trentm/node-bunyan"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a></body>"""); open("docs/bunyan.1.html", "w").write(h)'
|
python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace("</body>", """<a href="https://github.com/trentm/node-bunyan"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a></body>"""); open("docs/bunyan.1.html", "w").write(h)'
|
||||||
@echo "# test with 'man ./docs/bunyan.1' and 'open ./docs/bunyan.1.html'"
|
@echo "# test with 'man ./docs/bunyan.1' and 'open ./docs/bunyan.1.html'"
|
||||||
|
|
||||||
|
# Re-generate the README.md table of contents.
|
||||||
|
toc:
|
||||||
|
./node_modules/.bin/markdown-toc -i README.md
|
||||||
|
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: publish
|
||||||
publish:
|
publish:
|
||||||
mkdir -p tmp
|
mkdir -p tmp
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nodeunit": "0.9",
|
"nodeunit": "0.9",
|
||||||
"ben": "0.0.0",
|
"ben": "0.0.0",
|
||||||
|
"markdown-toc": "0.12.x",
|
||||||
"verror": "1.3.3",
|
"verror": "1.3.3",
|
||||||
"vasync": "1.4.3"
|
"vasync": "1.4.3"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue