@@ -213,6 +213,7 @@ grunt.initConfig({
213213
214214// -- Main Tasks ---------------------------------------------------------------
215215
216+ // npm tasks.
216217grunt . loadNpmTasks ( 'grunt-contrib-clean' ) ;
217218grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
218219grunt . loadNpmTasks ( 'grunt-contrib-concat' ) ;
@@ -222,8 +223,11 @@ grunt.loadNpmTasks('grunt-contrib-compress');
222223grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
223224grunt . loadNpmTasks ( 'grunt-css-selectors' ) ;
224225
226+ // Local tasks.
227+ grunt . loadTasks ( 'tasks/' ) ;
228+
225229grunt . registerTask ( 'default' , [ 'import' , 'test' , 'build' ] ) ;
226- grunt . registerTask ( 'import' , [ 'bower-install ' ] ) ;
230+ grunt . registerTask ( 'import' , [ 'bower_install ' ] ) ;
227231grunt . registerTask ( 'test' , [ 'csslint' ] ) ;
228232grunt . registerTask ( 'build' , [
229233 'clean:build' ,
@@ -245,61 +249,4 @@ grunt.registerTask('release', [
245249 'compress:release'
246250] ) ;
247251
248- // -- Suppress Task ------------------------------------------------------------
249-
250- grunt . registerTask ( 'suppress' , function ( ) {
251- var allowed = [ 'success' , 'fail' , 'warn' , 'error' ] ;
252-
253- grunt . util . hooker . hook ( grunt . log , {
254- passName : true ,
255-
256- pre : function ( name ) {
257- if ( allowed . indexOf ( name ) === - 1 ) {
258- grunt . log . muted = true ;
259- }
260- } ,
261-
262- post : function ( ) {
263- grunt . log . muted = false ;
264- }
265- } ) ;
266- } ) ;
267-
268- // -- Bower Tasks --------------------------------------------------------------
269-
270- grunt . registerTask ( 'bower-install' , 'Installs Bower dependencies.' , function ( ) {
271- var bower = require ( 'bower' ) ,
272- done = this . async ( ) ;
273-
274- bower . commands . install ( )
275- . on ( 'log' , function ( data ) {
276- if ( data . id !== 'install' ) { return ; }
277- grunt . log . writeln ( 'bower ' + data . id . cyan + ' ' + data . message ) ;
278- } )
279- . on ( 'end' , function ( results ) {
280- if ( ! Object . keys ( results ) . length ) {
281- grunt . log . writeln ( 'No bower packages to install.' ) ;
282- }
283-
284- done ( ) ;
285- } ) ;
286- } ) ;
287-
288- // -- License Task -------------------------------------------------------------
289-
290- grunt . registerMultiTask ( 'license' , 'Stamps license banners on files.' , function ( ) {
291- var options = this . options ( { banner : '' } ) ,
292- banner = grunt . template . process ( options . banner ) ,
293- tally = 0 ;
294-
295- this . files . forEach ( function ( filePair ) {
296- filePair . src . forEach ( function ( file ) {
297- grunt . file . write ( file , banner + grunt . file . read ( file ) ) ;
298- tally += 1 ;
299- } ) ;
300- } ) ;
301-
302- grunt . log . writeln ( 'Stamped license on ' + String ( tally ) . cyan + ' files.' ) ;
303- } ) ;
304-
305252} ;
0 commit comments