JsDoc Toolkit is great, but it’s a pain in the arse to type in that long command line whenever you want to run it. Here’s a shell script to run it quickly and easily.
Create a file called /usr/local/bin/jsdoc, and stick the following content in it.
#!/usr/bin/env bash
java -Djsdoc.dir=/usr/local/jsdoc \
-jar /usr/local/jsdoc/app/js.jar \
/usr/local/jsdoc/app/run.js \
-t=/usr/local/jsdoc/templates/sunny \
$@
Of course, this assumes you’ve installed JsDoc Toolkit to /usr/local/jsdoc. Be sure to modify the script to reflect where you’ve installed JsDoc Toolkit and your preferred theme.
Published: Tuesday, 29th January 2008 at 5:30 PM
By day, he works for ABC TV as a web developer. By night, he plays bass guitar in Look Who's Toxic. He also runs a little Unix Timestamp conversion site. There are plenty of other things he should be doing, but most of the time he's dreaming of what he'll do when he grows up while watching bad Star Trek spin-offs.