Skip to content

Commit 97d9628

Browse files
committed
Grunt: Whitelist js and css files for @Version replacement instead of blacklisting png.
(cherry picked from commit 3876c87)
1 parent dc67d2c commit 97d9628

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grunt.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,12 @@ grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @
340340
}
341341
files.forEach(function( fileName ) {
342342
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
343-
if ( /png$/.test( fileName ) ) {
344-
grunt.file.copy( fileName, target + targetFile );
345-
} else {
343+
if ( /(js|css)$/.test( fileName ) ) {
346344
grunt.file.copy( fileName, target + targetFile, {
347345
process: replaceVersion
348346
});
347+
} else {
348+
grunt.file.copy( fileName, target + targetFile );
349349
}
350350
});
351351
grunt.log.writeln( "Copied " + files.length + " files." );

0 commit comments

Comments
 (0)