11module . exports = function ( grunt ) {
2-
32 require ( 'load-grunt-tasks' ) ( grunt ) ;
4-
53 var concatAnim ;
64
75 grunt . initConfig ( {
8-
96 pkg : grunt . file . readJSON ( 'package.json' ) ,
107
118 concat : {
@@ -71,22 +68,21 @@ module.exports = function(grunt) {
7168 tasks : [ 'default' ]
7269 }
7370 }
74-
7571 } ) ;
7672
7773 // fuction to perform custom task
7874 concatAnim = function ( ) {
79-
8075 var categories = grunt . file . readJSON ( 'animate-config.json' ) ,
8176 category , files , file ,
8277 target = [ 'source/_base.css' ] ,
8378 count = 0 ;
8479
85- for ( category in categories ) {
86- if ( categories . hasOwnProperty ( category ) ) {
87- files = categories [ category ]
80+ for ( category in categories ) {
81+ if ( categories . hasOwnProperty ( category ) ) {
82+ files = categories [ category ] ;
83+
8884 for ( file in files ) {
89- if ( files . hasOwnProperty ( file ) && files [ file ] ) {
85+ if ( files . hasOwnProperty ( file ) && files [ file ] ) {
9086 target . push ( 'source/' + category + '/' + file + '.css' ) ;
9187 count += 1 ;
9288 }
@@ -102,12 +98,10 @@ module.exports = function(grunt) {
10298
10399 grunt . config ( 'concat' , { 'animate.css' : target } ) ;
104100 grunt . task . run ( 'concat' ) ;
105-
106101 } ;
107102
108103 // register task
109104 grunt . registerTask ( 'concat-anim' , 'Concatenates activated animations' , concatAnim ) ; // custom task
110105 grunt . registerTask ( 'default' , [ 'concat-anim' , 'autoprefixer' , 'cssmin' , 'usebanner' ] ) ;
111106 grunt . registerTask ( 'dev' , [ 'watch' ] ) ;
112-
113107} ;
0 commit comments