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) {
2929
3030 case '-t' :
3131 case '--title' :
32+
3233 config . title = args . shift ( ) ;
34+
3335 break ;
3436
3537 case '-d' :
3638 case '--description' :
39+
3740 config . description = args . shift ( ) ;
41+
3842 break ;
3943
4044 case '-l' :
4145 case '--layout' :
46+
4247 config . layout = args . shift ( ) ;
48+
4349 break ;
4450
4551 case '-p' :
4652 case '--package' :
53+
4754 pkg = args . shift ( ) ;
55+
4856 break ;
4957
5058 case '-o' :
5159 case '--output' :
60+
5261 output = args . shift ( ) ;
62+
5363 break ;
5464
5565 case '-v' :
5666 case '--version' :
67+
5768 process . stdout . write ( require ( '../package' ) . version + '\n' ) ;
5869 process . kill ( ) ;
70+
5971 break ;
6072
6173 default :
74+
6275 process . stdout . write ( '\n' ) ;
6376 process . stdout . write ( chalk . blue ( ' Usage:' ) + ' doxdox <path> [options]' + '\n\n' ) ;
6477 process . stdout . write ( ' Options:' + '\n\n' ) ;
@@ -75,6 +88,7 @@ while (args.length) {
7588 process . stdout . write ( ' - Markdown\t\t (http://daringfireball.net/projects/markdown/)' + '\n' ) ;
7689 process . stdout . write ( '\n' ) ;
7790 process . kill ( ) ;
91+
7892 break ;
7993
8094 }
Original file line number Diff line number Diff line change @@ -3,23 +3,33 @@ module.exports = function (hbs) {
33 var context ;
44
55 hbs . registerHelper ( 'ifCond' , function ( a , b , options ) {
6+
67 return a === b ? options . fn ( this ) : options . inverse ( this ) ;
8+
79 } ) ;
810
911 hbs . registerHelper ( 'ifCondMatch' , function ( a , b , options ) {
12+
1013 return String ( a ) . match ( new RegExp ( b , 'i' ) ) ? options . fn ( this ) : options . inverse ( this ) ;
14+
1115 } ) ;
1216
1317 hbs . registerHelper ( 'formatName' , function ( name ) {
18+
1419 return String ( name ) . replace ( / \. p r o t o t y p e / g, '' ) ;
20+
1521 } ) ;
1622
1723 hbs . registerHelper ( 'registerContext' , function ( ) {
24+
1825 context = this ;
26+
1927 } ) ;
2028
2129 hbs . registerHelper ( 'registerVariable' , function ( name , value ) {
30+
2231 context [ name ] = value ;
32+
2333 } ) ;
2434
2535} ;
Original file line number Diff line number Diff line change @@ -55,15 +55,21 @@ module.exports.walk = function (dir, opts) {
5555 var files = [ ] ;
5656
5757 if ( ! opts ) {
58+
5859 opts = { } ;
60+
5961 }
6062
6163 if ( ! opts . match ) {
64+
6265 opts . match = / \. j s $ / ;
66+
6367 }
6468
6569 if ( ! opts . exception ) {
70+
6671 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+
6773 }
6874
6975 if ( fs . existsSync ( dir ) && fs . statSync ( dir ) . isDirectory ( ) ) {
You can’t perform that action at this time.
0 commit comments