File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ var rimraf = require ( "rimraf" ) ;
2+
13/*jshint node:true */
24module . exports = function ( grunt ) {
35"use strict" ;
46
57var entryFiles = grunt . file . expandFiles ( "entries/*.xml" ) ;
68
7- grunt . loadNpmTasks ( "grunt-clean" ) ;
89grunt . loadNpmTasks ( "grunt-wordpress" ) ;
910grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
1011grunt . loadNpmTasks ( "grunt-check-modules" ) ;
1112
1213grunt . 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+
3941grunt . registerTask ( "default" , "build-wordpress" ) ;
4042grunt . registerTask ( "build" , "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" ) ;
4143grunt . registerTask ( "build-wordpress" , "check-modules clean lint xmllint build" ) ;
Original file line number Diff line number Diff line change 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" : []
You can’t perform that action at this time.
0 commit comments