Grunt: Whitelist js and css files for @version replacement instead of blacklisting png.

(cherry picked from commit 3876c874e3)
This commit is contained in:
Scott González 2012-04-02 13:15:54 -04:00
parent dc67d2c5d2
commit 97d9628929

View File

@ -340,12 +340,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." );