]> source.dussan.org Git - jquery-ui.git/commitdiff
Build/grunt: Use rimraf for clean task. Fix cop_hemes task to correctly rename the...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 21 Mar 2012 20:19:31 +0000 (21:19 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 21 Mar 2012 20:19:31 +0000 (21:19 +0100)
grunt.js
package.json

index 83522ebb4529443e127961430a98f6eed7acd2e9..37f2d91786e4ef2d070ee4acd018cb2ca8927a11 100644 (file)
--- a/grunt.js
+++ b/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
index 02d7a1173a72f1fb143b64d502b567ad29dbb7ac..de297f4674fa57a081a619748b6752bd2c8cb7eb 100644 (file)
@@ -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": []
 }
\ No newline at end of file