File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ var title = 'Untitled Project',
19
19
var args = process . argv . slice ( 2 ) ,
20
20
value ;
21
21
22
- var filename ;
22
+ var filename = '' ;
23
23
24
24
while ( args . length ) {
25
25
@@ -47,6 +47,22 @@ while (args.length) {
47
47
process . stdout . write ( pkg . version + '\n' ) ;
48
48
break ;
49
49
50
+ case '-h' :
51
+ case '--help' :
52
+ process . stdout . write ( '\n' ) ;
53
+ process . stdout . write ( ' Usage: doxdox <file> [options]' + '\n\n' ) ;
54
+ process . stdout . write ( ' Options:' + '\n\n' ) ;
55
+ process . stdout . write ( ' -h, --help\t\tDisplay this help message.' + '\n' ) ;
56
+ process . stdout . write ( ' -t, --title\t\tSets title.' + '\n' ) ;
57
+ process . stdout . write ( ' -d, --description\tSets description.' + '\n' ) ;
58
+ process . stdout . write ( ' -l, --layout\t\tTemplate to render the documentation with.' + '\n' ) ;
59
+ process . stdout . write ( '\n' ) ;
60
+ process . stdout . write ( ' Available Layouts:' + '\n\n' ) ;
61
+ process . stdout . write ( ' - Bootstrap 3 (http://getbootstrap.com/)' + '\n' ) ;
62
+ process . stdout . write ( ' - Markdown (http://daringfireball.net/projects/markdown/)' + '\n' ) ;
63
+ process . stdout . write ( '\n' ) ;
64
+ break ;
65
+
50
66
default :
51
67
filename = value ;
52
68
break ;
@@ -69,6 +85,10 @@ fs.exists(filename, function (exists) {
69
85
methods : utils . parseData ( data )
70
86
} ) ) ;
71
87
88
+ } else {
89
+
90
+ console . log ( 'File not found.' ) ;
91
+
72
92
}
73
93
74
94
} ) ;
You can’t perform that action at this time.
0 commit comments