From: Scott González Date: Mon, 2 Apr 2012 17:15:54 +0000 (-0400) Subject: Grunt: Whitelist js and css files for @version replacement instead of blacklisting... X-Git-Tag: 1.9.0m8~165 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3876c874e3f311d263aef9f99ed2780afa1d41d7;p=jquery-ui.git Grunt: Whitelist js and css files for @version replacement instead of blacklisting png. --- diff --git a/grunt.js b/grunt.js index 3be684908..ad4c8bd40 100644 --- 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." );