File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -29,36 +29,49 @@ while (args.length) {
29
29
30
30
case '-t' :
31
31
case '--title' :
32
+
32
33
config . title = args . shift ( ) ;
34
+
33
35
break ;
34
36
35
37
case '-d' :
36
38
case '--description' :
39
+
37
40
config . description = args . shift ( ) ;
41
+
38
42
break ;
39
43
40
44
case '-l' :
41
45
case '--layout' :
46
+
42
47
config . layout = args . shift ( ) ;
48
+
43
49
break ;
44
50
45
51
case '-p' :
46
52
case '--package' :
53
+
47
54
pkg = args . shift ( ) ;
55
+
48
56
break ;
49
57
50
58
case '-o' :
51
59
case '--output' :
60
+
52
61
output = args . shift ( ) ;
62
+
53
63
break ;
54
64
55
65
case '-v' :
56
66
case '--version' :
67
+
57
68
process . stdout . write ( require ( '../package' ) . version + '\n' ) ;
58
69
process . kill ( ) ;
70
+
59
71
break ;
60
72
61
73
default :
74
+
62
75
process . stdout . write ( '\n' ) ;
63
76
process . stdout . write ( chalk . blue ( ' Usage:' ) + ' doxdox <path> [options]' + '\n\n' ) ;
64
77
process . stdout . write ( ' Options:' + '\n\n' ) ;
@@ -75,6 +88,7 @@ while (args.length) {
75
88
process . stdout . write ( ' - Markdown\t\t (http://daringfireball.net/projects/markdown/)' + '\n' ) ;
76
89
process . stdout . write ( '\n' ) ;
77
90
process . kill ( ) ;
91
+
78
92
break ;
79
93
80
94
}
Original file line number Diff line number Diff line change @@ -3,23 +3,33 @@ module.exports = function (hbs) {
3
3
var context ;
4
4
5
5
hbs . registerHelper ( 'ifCond' , function ( a , b , options ) {
6
+
6
7
return a === b ? options . fn ( this ) : options . inverse ( this ) ;
8
+
7
9
} ) ;
8
10
9
11
hbs . registerHelper ( 'ifCondMatch' , function ( a , b , options ) {
12
+
10
13
return String ( a ) . match ( new RegExp ( b , 'i' ) ) ? options . fn ( this ) : options . inverse ( this ) ;
14
+
11
15
} ) ;
12
16
13
17
hbs . registerHelper ( 'formatName' , function ( name ) {
18
+
14
19
return String ( name ) . replace ( / \. p r o t o t y p e / g, '' ) ;
20
+
15
21
} ) ;
16
22
17
23
hbs . registerHelper ( 'registerContext' , function ( ) {
24
+
18
25
context = this ;
26
+
19
27
} ) ;
20
28
21
29
hbs . registerHelper ( 'registerVariable' , function ( name , value ) {
30
+
22
31
context [ name ] = value ;
32
+
23
33
} ) ;
24
34
25
35
} ;
Original file line number Diff line number Diff line change @@ -55,15 +55,21 @@ module.exports.walk = function (dir, opts) {
55
55
var files = [ ] ;
56
56
57
57
if ( ! opts ) {
58
+
58
59
opts = { } ;
60
+
59
61
}
60
62
61
63
if ( ! opts . match ) {
64
+
62
65
opts . match = / \. j s $ / ;
66
+
63
67
}
64
68
65
69
if ( ! opts . exception ) {
70
+
66
71
opts . exception = / \. g i t | \. m i n | n o d e _ m o d u l e s | b o w e r _ c o m p o n e n t s | t e s t | g r u n t f i l e | g u l p f i l e / i;
72
+
67
73
}
68
74
69
75
if ( fs . existsSync ( dir ) && fs . statSync ( dir ) . isDirectory ( ) ) {
You can’t perform that action at this time.
0 commit comments