File tree 2 files changed +8
-6
lines changed 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change
1
+ var rimraf = require ( "rimraf" ) ;
2
+
1
3
/*jshint node:true */
2
4
module . exports = function ( grunt ) {
3
5
4
6
"use strict" ;
5
7
6
8
var entryFiles = grunt . file . expandFiles ( "entries/*.xml" ) ;
7
9
8
- grunt . loadNpmTasks ( "grunt-clean" ) ;
9
10
grunt . loadNpmTasks ( "grunt-wordpress" ) ;
10
11
grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
11
12
grunt . loadNpmTasks ( "grunt-check-modules" ) ;
12
13
13
14
grunt . initConfig ( {
14
- clean : {
15
- folder : "dist"
16
- } ,
17
15
lint : {
18
16
grunt : "grunt.js"
19
17
} ,
@@ -46,6 +44,10 @@ grunt.initConfig({
46
44
}
47
45
} ) ;
48
46
47
+ grunt . registerTask ( "clean" , function ( ) {
48
+ rimraf . sync ( "dist" ) ;
49
+ } ) ;
50
+
49
51
grunt . registerTask ( "default" , "build-wordpress" ) ;
50
52
grunt . registerTask ( "build" , "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" ) ;
51
53
grunt . registerTask ( "build-wordpress" , "check-modules clean lint xmllint build" ) ;
Original file line number Diff line number Diff line change 20
20
],
21
21
"dependencies" : {
22
22
"grunt" : " 0.3.17" ,
23
- "grunt-clean" : " 0.3.0" ,
24
23
"grunt-wordpress" : " 1.2.1" ,
25
24
"grunt-jquery-content" : " 0.13.0" ,
26
25
"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"
28
28
},
29
29
"devDependencies" : {},
30
30
"keywords" : [],
You can’t perform that action at this time.
0 commit comments