mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Build/grunt: Use rimraf for clean task. Fix cop_hemes task to correctly rename the -custom.css file
This commit is contained in:
parent
2a1ee37258
commit
a84512f9cf
8
grunt.js
8
grunt.js
@ -446,7 +446,7 @@ task.registerTask( "copy_themes", function() {
|
||||
// TODO the template.process call shouldn't be necessary
|
||||
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.css" );
|
||||
var targetFile = fileName.replace( /dist\/tmp\/\d+\/development-bundle\//, "" ).replace( "jquery-ui-.custom", "jquery-ui" );
|
||||
file.copy( fileName, target + targetFile );
|
||||
});
|
||||
|
||||
@ -460,11 +460,7 @@ task.registerTask( "copy_themes", function() {
|
||||
});
|
||||
|
||||
task.registerTask( "clean", function() {
|
||||
// TODO use node methods and keep the dir, only delete its content
|
||||
utils.spawn({
|
||||
cmd: "rm",
|
||||
args: [ "-rf", "dist" ]
|
||||
}, this.async());
|
||||
require( "rimraf" ).sync( "dist" );
|
||||
});
|
||||
|
||||
// TODO merge with code in jQuery Core, share as grunt plugin/npm
|
||||
|
@ -30,7 +30,8 @@
|
||||
"sqwish": "0.2.x",
|
||||
"request": "2.9.x",
|
||||
"csslint": "0.9.x",
|
||||
"adm-zip": "0.1.x"
|
||||
"adm-zip": "0.1.x",
|
||||
"rimraf": "2.0.1"
|
||||
},
|
||||
"keywords": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user