Skip to content

Commit b197306

Browse files
committed
Build: Upgrade to Grunt 0.4 API
* Upgrades to grunt 0.4.5 * Upgrades to grunt-jquery-content 2.0.0 * Removes many grunt plugins which are now bundled into grunt-jquery-content * Removes many unused and unnecessary tasks * Removes directory from sample config since there's only one useful value Requires updating WordPress plugin from grunt-wordpress 1.0.7 to gilded-wordpress 1.0.0.
1 parent dc79b26 commit b197306

File tree

4 files changed

+43
-55
lines changed

4 files changed

+43
-55
lines changed

Gruntfile.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = function( grunt ) {
2+
3+
grunt.loadNpmTasks( "grunt-jquery-content" );
4+
5+
grunt.initConfig({
6+
xmllint: {
7+
all: [
8+
"entries/**",
9+
"categories.xml",
10+
"entries2html.xsl",
11+
"notes.xsl"
12+
]
13+
},
14+
"build-posts": {
15+
page: "pages/**"
16+
},
17+
"build-xml-entries": {
18+
all: "entries/**"
19+
},
20+
"build-resources": {
21+
all: "resources/**"
22+
},
23+
wordpress: (function() {
24+
var config = require( "./config" );
25+
config.dir = "dist/wordpress";
26+
return config;
27+
})()
28+
});
29+
30+
grunt.registerTask( "lint", [ "xmllint" ] );
31+
32+
grunt.registerTask( "build", [
33+
"build-posts",
34+
"build-resources",
35+
"build-xml-entries",
36+
"build-xml-categories",
37+
"build-xml-full"
38+
]);
39+
40+
};

config-sample.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"url": "validation.local",
33
"username": "admin",
4-
"password": "secret",
5-
"dir": "dist/wordpress"
4+
"password": "secret"
65
}

grunt.js

-48
This file was deleted.

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
}
2222
],
2323
"dependencies": {
24-
"grunt": "0.3.17",
25-
"grunt-clean": "0.3.0",
26-
"grunt-wordpress": "1.0.7",
27-
"grunt-jquery-content": "0.9.0",
28-
"grunt-check-modules": "0.1.0"
24+
"grunt": "0.4.5",
25+
"grunt-jquery-content": "2.0.0"
2926
}
3027
}

0 commit comments

Comments
 (0)