forked from jashkenas/docco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running Docco via an exported public API:
- run(args=process.argv) : Run Docco from the command line - document(sources,options,callback) : Run Docco over a list of source wildcard matches, with the specified options, with an optional completion callback - resolve_source(source) : Useful utility for resolving a source input (supports wildcards) to a list of matched files. Add Docco configurable options: - use commander.js for command line option parsing, and usage output generation. (Tried to borrow CoffeeScript optparser, but it's not exposed.) - add options for specifying what jst template to use, which css file to copy, and what output folder to use. Misc - Update docco binary to invoke Docco.run() rather than just requiring the library. Add command line coffee file (second file, drats!): In order to be able to use docco outside of a direct command line invocation, the main Docco file cannot automatically process the argv and run. It needed to export an API that can be used to run it from the command line, as well as directly from within another application. The good news is that this second file is really just for convenience for developers running Docco directly. e.g. "coffee src/cmd -t myproj/custom_template.jst src/*.coffee")
- Loading branch information
1 parent
9ea1a35
commit 608870d
Showing
5 changed files
with
166 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(function() { | ||
|
||
(new require('./docco')).run(); | ||
|
||
}).call(this); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# A simple coffee file to enable direct invocation of docco.coffee, | ||
# now that the file is not runnable. | ||
(new require './docco').run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters