11var rimraf = require ( "rimraf" ) ;
22
3- /*jshint node:true */
43module . exports = function ( grunt ) {
54
6- "use strict" ;
7-
85var entryFiles = grunt . file . expandFiles ( "entries/*.xml" ) ;
96
10- grunt . loadNpmTasks ( "grunt-wordpress" ) ;
11- grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
127grunt . loadNpmTasks ( "grunt-check-modules" ) ;
8+ grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
9+ grunt . loadNpmTasks ( "grunt-wordpress" ) ;
1310
1411grunt . initConfig ( {
15- lint : {
16- grunt : "grunt.js"
17- } ,
1812 xmllint : {
1913 all : [ ] . concat ( entryFiles , "categories.xml" , "entries2html.xsl" )
2014 } ,
21- xmltidy : {
22- all : [ ] . concat ( entryFiles , "categories.xml" )
23- } ,
2415 "build-pages" : {
2516 all : grunt . file . expandFiles ( "pages/**" )
2617 } ,
@@ -32,25 +23,14 @@ grunt.initConfig({
3223 } ,
3324 wordpress : grunt . utils . _ . extend ( {
3425 dir : "dist/wordpress"
35- } , grunt . file . readJSON ( "config.json" ) ) ,
36- watch : {
37- scripts : {
38- files : 'entries/*.xml' ,
39- tasks : [ 'wordpress-deploy' ] ,
40- options : {
41- interrupt : true
42- }
43- }
44- }
26+ } , grunt . file . readJSON ( "config.json" ) )
4527} ) ;
4628
4729grunt . registerTask ( "clean" , function ( ) {
4830 rimraf . sync ( "dist" ) ;
4931} ) ;
5032
51- grunt . registerTask ( "default" , "build-wordpress" ) ;
5233grunt . registerTask ( "build" , "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" ) ;
53- grunt . registerTask ( "build-wordpress" , "check-modules clean lint xmllint build" ) ;
54- grunt . registerTask ( "tidy" , "xmllint xmltidy" ) ;
34+ grunt . registerTask ( "build-wordpress" , "check-modules clean xmllint build" ) ;
5535
5636} ;
0 commit comments