blog.craiga.id.au — Shell Script to run JsDoc Toolkit

JsDoc Toolkit is great, but it’s a pain in the arse to type in that long com­m­and 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 fol­l­ow­ing 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­/­lo­cal­/­jsdoc. Be sure to modify the script to reflect where you’ve in­s­t­al­l­ed JsDoc Toolkit and your preferred theme.

Published: Tuesday, 29th January 2008 at 5:30 PM

Related

About Craig Anderson

By day, he works for ABC TV as a web dev­el­oper. By night, he plays bass gui­tar in Look Who's Tox­ic. He also runs a little Unix Time­stamp con­ver­sion site. There are plen­ty 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.