@@ -8,54 +8,9 @@ var documentation = require('../'),
8
8
path = require ( 'path' ) ,
9
9
fs = require ( 'fs' ) ,
10
10
vfs = require ( 'vinyl-fs' ) ,
11
-
12
- loadConfig = require ( '../lib/load_config.js' ) ;
13
-
14
- var yargs = require ( 'yargs' )
15
- . usage ( 'Usage: $0 <command> [options]' )
16
-
17
- . alias ( 'f' , 'format' )
18
- . default ( 'f' , 'json' )
19
- . describe ( 'f' , 'output format, of [json, md, html]' )
20
-
21
- . describe ( 'lint' , 'check output for common style and uniformity mistakes' )
22
-
23
- . describe ( 't' , 'specify a theme: this must be a valid theme module' )
24
- . alias ( 't' , 'theme' )
25
-
26
- . boolean ( 'p' )
27
- . describe ( 'p' , 'generate documentation tagged as private' )
28
- . alias ( 'p' , 'private' )
29
-
30
- . describe ( 'name' , 'project name. by default, inferred from package.json' )
31
- . describe ( 'version' , 'project version. by default, inferred from package.json' )
32
-
33
- . boolean ( 'shallow' )
34
- . describe ( 'shallow' , 'shallow mode turns off dependency resolution, ' +
35
- 'only processing the specified files (or the main script specified in package.json)' )
36
- . default ( 'shallow' , false )
37
-
38
- . boolean ( 'polyglot' )
39
- . describe ( 'polyglot' , 'polyglot mode turns off dependency resolution and ' +
40
- 'enables multi-language support. use this to document c++' )
41
-
42
- . boolean ( 'g' )
43
- . describe ( 'g' , 'infer links to github in documentation' )
44
- . alias ( 'g' , 'github' )
45
-
46
- . describe ( 'o' , 'output location. omit for stdout, otherwise is a filename ' +
47
- 'for single-file outputs and a directory name for multi-file outputs like html' )
48
- . alias ( 'o' , 'output' )
49
- . default ( 'o' , 'stdout' )
50
-
51
- . describe ( 'c' , 'configuration file. an array defining explicit sort order' )
52
- . alias ( 'c' , 'config' )
53
-
54
- . help ( 'h' )
55
- . alias ( 'h' , 'help' )
56
-
57
- . example ( '$0 foo.js' , 'parse documentation in a given file' ) ,
58
- argv = yargs . argv ;
11
+ loadConfig = require ( '../lib/load_config.js' ) ,
12
+ args = require ( '../lib/args.js' ) ,
13
+ argv = args . parse ( process . argv . slice ( 2 ) ) ;
59
14
60
15
var inputs ,
61
16
name = argv . name ,
0 commit comments