11function loadConfig ( path ) {
2- var glob = require ( 'glob' ) ;
3- var object = { } ;
4- var key ;
5-
6- glob . sync ( '*' , { cwd : path } ) . forEach ( function ( option ) {
7- key = option . replace ( / \. j s $ / , '' ) ;
8- object [ key ] = require ( path + option ) ;
9- } ) ;
10-
11- return object ;
2+ var glob = require ( 'glob' ) ;
3+ var object = { } ;
4+ var key ;
5+
6+ glob . sync ( '*' , {
7+ cwd : path
8+ } ) . forEach ( function ( option ) {
9+ key = option . replace ( / \. j s $ / , '' ) ;
10+ object [ key ] = require ( path + option ) ;
11+ } ) ;
12+
13+ return object ;
1214}
1315
1416module . exports = function ( grunt ) {
15- grunt . loadTasks ( 'grunt-tasks' ) ;
16-
17- require ( 'time-grunt' ) ( grunt ) ;
18-
19- // Only load tasks when they are needed
20- require ( 'jit-grunt' ) ( grunt , {
21- ngtemplates : 'grunt-angular-templates'
22- } ) ;
23-
24- var config = {
25- pkg : grunt . file . readJSON ( 'package.json' ) ,
26- env : process . env
27- } ;
28-
29- grunt . util . _ . extend ( config , loadConfig ( './grunt-tasks/options/' ) ) ;
30- grunt . initConfig ( config ) ;
31- } ;
17+ grunt . loadTasks ( 'grunt-tasks' ) ;
18+
19+ require ( 'time-grunt' ) ( grunt ) ;
20+
21+ // Only load tasks when they are needed
22+ require ( 'jit-grunt' ) ( grunt , {
23+ ngtemplates : 'grunt-angular-templates'
24+ } ) ;
25+
26+ var config = {
27+ pkg : grunt . file . readJSON ( 'package.json' ) ,
28+ env : process . env
29+ } ;
30+
31+ grunt . util . _ . extend ( config , loadConfig ( './grunt-tasks/options/' ) ) ;
32+ grunt . initConfig ( config ) ;
33+ } ;
0 commit comments