File decorator for docopt option parser.
Description
It's not easy to work with docopt in pure JavaScript since, unlike Python and CoffeeScript, there's no simple way to define a multiline string to contain the usage string.
This package provides a decorator for docopt to solve this problem.
/*Usage: hello [options] <world> Arguments: <world> Hello world! Options: -h, --help Show this help. --version Show version. --happy Be happy.*/ var docopt = ;
By default it will decorate the global docopt instance, so the above is the same as:
var docopt = docopt;
Then, pass the documented filename instead of the usage string:
var args = ;
You can also use the internal functions to extract the comment block from a file or a code buffer:
var doc = ;var doc = ;