From 97d9628929870bf1ce451d2909c12f7f69bcbf19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 2 Apr 2012 13:15:54 -0400 Subject: [PATCH] Grunt: Whitelist js and css files for @version replacement instead of blacklisting png. (cherry picked from commit 3876c874e3f311d263aef9f99ed2780afa1d41d7) --- grunt.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grunt.js b/grunt.js index 70f94c643e1..344746c425a 100644 --- a/grunt.js +++ b/grunt.js @@ -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." );