Skip to content

Commit 3876c87

Browse files
committed
Grunt: Whitelist js and css files for @Version replacement instead of blacklisting png.
1 parent 585ef70 commit 3876c87

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
@@ -338,12 +338,12 @@ grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @
338338
}
339339
files.forEach(function( fileName ) {
340340
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
341-
if ( /png$/.test( fileName ) ) {
342-
grunt.file.copy( fileName, target + targetFile );
343-
} else {
341+
if ( /(js|css)$/.test( fileName ) ) {
344342
grunt.file.copy( fileName, target + targetFile, {
345343
process: replaceVersion
346344
});
345+
} else {
346+
grunt.file.copy( fileName, target + targetFile );
347347
}
348348
});
349349
grunt.log.writeln( "Copied " + files.length + " files." );

0 commit comments

Comments
 (0)