1
1
var rimraf = require ( "rimraf" ) ;
2
2
3
- /*jshint node:true */
4
3
module . exports = function ( grunt ) {
5
4
6
- "use strict" ;
7
-
8
5
var entryFiles = grunt . file . expandFiles ( "entries/*.xml" ) ;
9
6
10
- grunt . loadNpmTasks ( "grunt-wordpress" ) ;
11
- grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
12
7
grunt . loadNpmTasks ( "grunt-check-modules" ) ;
8
+ grunt . loadNpmTasks ( "grunt-jquery-content" ) ;
9
+ grunt . loadNpmTasks ( "grunt-wordpress" ) ;
13
10
14
11
grunt . initConfig ( {
15
- lint : {
16
- grunt : "grunt.js"
17
- } ,
18
12
xmllint : {
19
13
all : [ ] . concat ( entryFiles , "categories.xml" , "entries2html.xsl" )
20
14
} ,
21
- xmltidy : {
22
- all : [ ] . concat ( entryFiles , "categories.xml" )
23
- } ,
24
15
"build-pages" : {
25
16
all : grunt . file . expandFiles ( "pages/**" )
26
17
} ,
@@ -32,25 +23,14 @@ grunt.initConfig({
32
23
} ,
33
24
wordpress : grunt . utils . _ . extend ( {
34
25
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" ) )
45
27
} ) ;
46
28
47
29
grunt . registerTask ( "clean" , function ( ) {
48
30
rimraf . sync ( "dist" ) ;
49
31
} ) ;
50
32
51
- grunt . registerTask ( "default" , "build-wordpress" ) ;
52
33
grunt . 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" ) ;
55
35
56
36
} ;
0 commit comments