136
136
debug : {
137
137
files : [ '<%= srcFiles %>' ] ,
138
138
tasks : [ 'debug' ]
139
+ } ,
140
+ less : {
141
+ files : [ 'src/less/**/*.less' ] ,
142
+ tasks : [ 'less' ]
139
143
}
140
144
} ,
141
145
ngtemplates : {
190
194
templates : {
191
195
src : [ "<%= ngtemplates.ngGrid.dest %>" ]
192
196
}
197
+ } ,
198
+ less : {
199
+ build : {
200
+ options : {
201
+ // yuicompress: true
202
+ } ,
203
+ files : {
204
+ "ng-grid.css" : [ "src/less/global.less" ]
205
+ }
206
+ }
193
207
}
194
208
} ) ;
195
209
207
221
208
222
// Load the plugin that provides the "uglify" task.
209
223
grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
224
+ grunt . loadNpmTasks ( 'grunt-contrib-less' ) ;
210
225
//grunt.loadNpmTasks('grunt-contrib-concat');
211
226
grunt . loadNpmTasks ( 'grunt-jsdoc' ) ;
212
227
grunt . loadNpmTasks ( 'grunt-angular-templates' ) ;
213
228
grunt . loadNpmTasks ( 'grunt-contrib-clean' ) ;
214
229
215
230
// Old default task
216
- grunt . registerTask ( 'build' , [ 'ngtemplates' , 'concat' , 'uglify' , 'clean' ] ) ;
231
+ grunt . registerTask ( 'build' , [ 'less' , ' ngtemplates', 'concat' , 'uglify' , 'clean' ] ) ;
217
232
218
233
// Default task(s).
219
234
grunt . registerTask ( 'default' , 'No default task' , function ( ) {
220
235
grunt . log . write ( 'The old default task has been moved to "build" to prevent accidental triggering' ) ;
221
236
} ) ;
222
237
223
- grunt . registerTask ( 'debug' , [ 'ngtemplates' , 'concat:debug' , 'clean' ] ) ;
224
- grunt . registerTask ( 'prod' , [ 'ngtemplates' , 'concat:prod' , 'uglify' , 'clean' ] ) ;
238
+ grunt . registerTask ( 'debug' , [ 'less' , ' ngtemplates', 'concat:debug' , 'clean' ] ) ;
239
+ grunt . registerTask ( 'prod' , [ 'less' , ' ngtemplates', 'concat:prod' , 'uglify' , 'clean' ] ) ;
225
240
grunt . registerTask ( 'version' , [ 'ngtemplates' , 'concat:version' , 'uglify:version' , 'clean' ] ) ;
226
241
} ;
0 commit comments