Skip to content

Commit dd17069

Browse files
committed
Build: Replace grunt-clean with rimraf
1 parent 7c6ae83 commit dd17069

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

grunt.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1+
var rimraf = require( "rimraf" );
2+
13
/*jshint node:true */
24
module.exports = function( grunt ) {
35

46
"use strict";
57

68
var entryFiles = grunt.file.expandFiles( "entries/*.xml" );
79

8-
grunt.loadNpmTasks( "grunt-clean" );
910
grunt.loadNpmTasks( "grunt-wordpress" );
1011
grunt.loadNpmTasks( "grunt-jquery-content" );
1112
grunt.loadNpmTasks( "grunt-check-modules" );
1213

1314
grunt.initConfig({
14-
clean: {
15-
folder: "dist"
16-
},
1715
lint: {
1816
grunt: "grunt.js"
1917
},
@@ -46,6 +44,10 @@ grunt.initConfig({
4644
}
4745
});
4846

47+
grunt.registerTask( "clean", function() {
48+
rimraf.sync( "dist" );
49+
});
50+
4951
grunt.registerTask( "default", "build-wordpress" );
5052
grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" );
5153
grunt.registerTask( "build-wordpress", "check-modules clean lint xmllint build" );

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
],
2121
"dependencies": {
2222
"grunt": "0.3.17",
23-
"grunt-clean": "0.3.0",
2423
"grunt-wordpress": "1.2.1",
2524
"grunt-jquery-content": "0.13.0",
2625
"grunt-check-modules": "0.1.0",
27-
"grunt-contrib-watch": "0.1.4"
26+
"grunt-contrib-watch": "0.1.4",
27+
"rimraf": "2.2.8"
2828
},
2929
"devDependencies": {},
3030
"keywords": [],

0 commit comments

Comments
 (0)