File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,13 +34,29 @@ if (fs.existsSync(configPath)) {
3434 } else {
3535 config = require ( configPath ) ;
3636 }
37- comb = new Comb ( ) ;
37+
38+ if ( config . template ) {
39+ if ( fs . existsSync ( config . template ) ) {
40+ comb = new Comb ( ) ;
41+ comb . detect ( ) ;
42+ var templateConfig = comb . processFile ( config . template ) ;
43+ for ( var attrname in templateConfig ) {
44+ if ( ! config [ attrname ] ) {
45+ config [ attrname ] = templateConfig [ attrname ] ;
46+ }
47+ }
48+ } else {
49+ console . log ( 'Template configuration file ' + config . template + ' was not found.' ) ;
50+ process . exit ( 1 ) ;
51+ }
52+ }
3853
3954 console . time ( 'spent' ) ;
4055
4156 config . verbose = program . verbose === true || config . verbose ;
4257 config . lint = program . lint ;
4358
59+ comb = new Comb ( ) ;
4460 comb . configure ( config ) ;
4561
4662 vow . all ( program . args . map ( comb . processPath . bind ( comb ) ) )
You can’t perform that action at this time.
0 commit comments