Permalink
Browse files

got -h going

  • Loading branch information...
1 parent e275810 commit a3fb82b53cff3daf865e6427eae326af6d0fbab1 @msuarz msuarz committed Oct 27, 2012
Showing with 23 additions and 9 deletions.
  1. +23 −9 src/readers/settings.coffee
@@ -5,21 +5,35 @@ _ = require 'underscore'
{ defaults } = require '../settings'
usage = '''
- Usage: frank [docs] [options]
- Docs: [docs.root\[docs.type]]
+Usage: frank [docs] [options]
- shortcut to set root & type properties in settings.docs
+Docs: [docs.root\\[docs.type]]
- Options:
+ shortcut to set root & type properties in settings.docs
- these become settings properties
-'''
+ --docs.root docs root folder [.]
+ --docs.type extension of doc files [*.txt]
-optimist = require 'optimist'
-argv = optimist.usage(usage).argv
+Options:
+
+ these become settings properties
+
+ -h, --help output usage information
+ -r, --report <name> select report output [console]
+ -o, --only <pattern> only run docs matching <pattern>'''
-optimist.showHelp()
+optimist = require 'optimist'
+argv = optimist
+ .usage(usage)
+ .alias('h', 'help')
+ .alias('r', 'report')
+ .alias('o', 'only')
+ .argv
+
+if argv.h?
+ optimist.showHelp()
+ process.exit()
@read = ->
global.settings = {}

0 comments on commit a3fb82b

Please sign in to comment.