aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-03-23 07:59:36 -0400
committerScott González <scott.gonzalez@gmail.com>2012-03-23 07:59:36 -0400
commite4f0cab0430811edd2a37dc275409aefd309c014 (patch)
tree639b869b20398de7e1c68dddced7981fac0df8e5
parent610e7949764462e50be308e2c15745004b4a267c (diff)
downloadjquery-ui-e4f0cab0430811edd2a37dc275409aefd309c014.tar.gz
jquery-ui-e4f0cab0430811edd2a37dc275409aefd309c014.zip
Grunt: Switch back to using file.copy().
-rw-r--r--grunt.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/grunt.js b/grunt.js
index dfc9c63b5..409f2684a 100644
--- a/grunt.js
+++ b/grunt.js
@@ -293,7 +293,11 @@ task.registerMultiTask( "copy", "Copy files to destination folder and replace @V
}
files.forEach(function( fileName ) {
var targetFile = strip ? fileName.replace( strip, "" ) : fileName;
- file.copy( fileName, target + targetFile, replaceVersion );
+ if ( /png$/.test( fileName ) ) {
+ file.copy( fileName, target + targetFile );
+ } else {
+ file.copy( fileName, target + targetFile, replaceVersion );
+ }
});
log.writeln( "Copied " + files.length + " files." );
var renameCount = 0;
@@ -438,7 +442,6 @@ task.registerTask( "download_themes", function() {
});
task.registerTask( "copy_themes", function() {
- var fs = require( "fs" );
// each package includes the base theme, ignore that
var filter = /themes\/base/;
var files = file.expand( "dist/tmp/*/development-bundle/themes/**/*" ).filter(function( file ) {
@@ -448,7 +451,7 @@ task.registerTask( "copy_themes", function() {
var target = "dist/" + template.process( config( "files.themes" ), config() ) + "/";
files.forEach(function( fileName ) {
var targetFile = fileName.replace( /dist\/tmp\/\d+\/development-bundle\//, "" ).replace( "jquery-ui-.custom", "jquery-ui" );
- file.write( target + targetFile, fs.readFileSync( fileName ) );
+ file.copy( fileName, target + targetFile );
});
// copy minified base theme from regular release