]> source.dussan.org Git - jquery-ui.git/commitdiff
Grunt: Whitelist js and css files for @version replacement instead of blacklisting...
authorScott González <scott.gonzalez@gmail.com>
Mon, 2 Apr 2012 17:15:54 +0000 (13:15 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 2 Apr 2012 17:15:54 +0000 (13:15 -0400)
grunt.js

index 3be6849086f837de1f804a03e06c4cc8c04ec2e3..ad4c8bd4088f146f0cec90663d0b13b7f0e378fd 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -338,12 +338,12 @@ grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @
        }
        files.forEach(function( fileName ) {
                var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
-               if ( /png$/.test( fileName ) ) {
-                       grunt.file.copy( fileName, target + targetFile );
-               } else {
+               if ( /(js|css)$/.test( fileName ) ) {
                        grunt.file.copy( fileName, target + targetFile, {
                                process: replaceVersion
                        });
+               } else {
+                       grunt.file.copy( fileName, target + targetFile );
                }
        });
        grunt.log.writeln( "Copied " + files.length + " files." );