Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Commit 0b40a42

Browse files
committed
Build: Replace grunt-clean with rimraf
1 parent 41598a0 commit 0b40a42

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

grunt.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
var config = require( "./lib/config" );
2-
var path = require( "path" );
1+
var path = require( "path" ),
2+
rimraf = require( "rimraf" ),
3+
config = require( "./lib/config" );
34

45
module.exports = function( grunt ) {
56

67
var async = grunt.utils.async;
78

89
grunt.loadNpmTasks( "grunt-wordpress" );
9-
grunt.loadNpmTasks( "grunt-clean" );
1010
grunt.loadNpmTasks( "grunt-jquery-content" );
1111
grunt.loadNpmTasks( "grunt-check-modules" );
1212

1313
grunt.initConfig({
14-
clean: {
15-
wordpress: "dist/"
16-
},
1714
lint: {
1815
grunt: "grunt.js",
1916
src: [ "lib/**", "scripts/**" ]
@@ -42,6 +39,10 @@ grunt.initConfig({
4239
}, config.wordpress )
4340
});
4441

42+
grunt.registerTask( "clean", function() {
43+
rimraf.sync( "dist" );
44+
});
45+
4546
// We only want to sync the documentation, so we override wordpress-get-postpaths
4647
// to only find pages. This ensures that we don't delete all of the plugin posts.
4748
grunt.registerHelper( "wordpress-get-postpaths", function( fn ) {
@@ -113,8 +114,7 @@ grunt.registerTask( "sync-docs", function() {
113114
// clean-all will delete EVERYTHING, including the plugin registery. This is
114115
// useful only for development if you want a clean slate to test from.
115116
grunt.registerTask( "clean-all", function() {
116-
var rimraf = require( "rimraf" ),
117-
retry = require( "./lib/retrydb" );
117+
var retry = require( "./lib/retrydb" );
118118

119119
// clean repo checkouts
120120
rimraf.sync( config.repoDir );

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"grunt-wordpress": "1.2.1",
2020
"grunt-check-modules": "0.1.0",
2121
"grunt-jquery-content": "0.13.0",
22-
"grunt-clean": "0.3.0",
2322
"simple-log": "1.1.0"
2423
}
2524
}

0 commit comments

Comments
 (0)