mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Grunt: Whitelist js and css files for @version replacement instead of blacklisting png.
This commit is contained in:
parent
585ef702ef
commit
3876c874e3
6
grunt.js
6
grunt.js
@ -338,12 +338,12 @@ grunt.registerMultiTask( "copy", "Copy files to destination folder and replace @
|
|||||||
}
|
}
|
||||||
files.forEach(function( fileName ) {
|
files.forEach(function( fileName ) {
|
||||||
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
|
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
|
||||||
if ( /png$/.test( fileName ) ) {
|
if ( /(js|css)$/.test( fileName ) ) {
|
||||||
grunt.file.copy( fileName, target + targetFile );
|
|
||||||
} else {
|
|
||||||
grunt.file.copy( fileName, target + targetFile, {
|
grunt.file.copy( fileName, target + targetFile, {
|
||||||
process: replaceVersion
|
process: replaceVersion
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
grunt.file.copy( fileName, target + targetFile );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
grunt.log.writeln( "Copied " + files.length + " files." );
|
grunt.log.writeln( "Copied " + files.length + " files." );
|
||||||
|
Loading…
Reference in New Issue
Block a user