Skip to content

Commit

Permalink
Documents current directory if called without args
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Khan committed Aug 31, 2011
1 parent c47222b commit f3156f8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 deletions.
33 changes: 19 additions & 14 deletions lib/docgen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 15 additions & 11 deletions src/docgen.coffee
Expand Up @@ -35,19 +35,23 @@ OPTIONS =

opts = process.argv[2...process.argv.length]
if opts.length == 0
console.log('Usage: coffeedoc [options] targets\n')
console.log('Options:')
for flag, description of OPTIONS
console.log(' ' + flag + ': ' + description)
process.exit()
if opts[0] == '--requirejs'
opts.shift()
parser = new parsers.RequireJSParser()
else if opts[0] == '--commonjs'
opts.shift()
opts = ['.']
parser = new parsers.CommonJSParser()
else
parser = new parsers.CommonJSParser()
if opts[0] == '--help'
console.log('Usage: coffeedoc [options] targets\n')
console.log('Options:')
for flag, description of OPTIONS
console.log(' ' + flag + ': ' + description)
process.exit()
if opts[0] == '--requirejs'
opts.shift()
parser = new parsers.RequireJSParser()
else if opts[0] == '--commonjs'
opts.shift()
parser = new parsers.CommonJSParser()
else
parser = new parsers.CommonJSParser()

# Get source file paths
sources = []
Expand Down

0 comments on commit f3156f8

Please sign in to comment.