Skip to content

Commit 6d903c8

Browse files
committed
Build: Replace grunt-clean with rimraf
1 parent 11c8f90 commit 6d903c8

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

grunt.js

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

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

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

1213
grunt.initConfig({
13-
clean: {
14-
folder: "dist"
15-
},
1614
lint: {
1715
grunt: "grunt.js"
1816
},
@@ -36,6 +34,10 @@ grunt.initConfig({
3634
}, grunt.file.readJSON( "config.json" ) )
3735
});
3836

37+
grunt.registerTask( "clean", function() {
38+
rimraf.sync( "dist" );
39+
});
40+
3941
grunt.registerTask( "default", "build-wordpress" );
4042
grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" );
4143
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
@@ -22,10 +22,10 @@
2222
],
2323
"dependencies": {
2424
"grunt": "0.3.17",
25-
"grunt-clean": "0.3.0",
2625
"grunt-wordpress": "1.2.1",
2726
"grunt-jquery-content": "0.13.0",
28-
"grunt-check-modules": "0.1.0"
27+
"grunt-check-modules": "0.1.0",
28+
"rimraf": "2.2.8"
2929
},
3030
"devDependencies": {},
3131
"keywords": []

0 commit comments

Comments
 (0)