Skip to content

Commit 6a1511f

Browse files
committed
Build: Upgrade to grunt-jquery-content 2.0.0
1 parent 63e8413 commit 6a1511f

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

Gruntfile.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
var rimraf = require( "rimraf" ),
2-
spawnback = require( "spawnback" ),
1+
var spawnback = require( "spawnback" ),
32
jqueryContent = require( "grunt-jquery-content" );
43

54
module.exports = function( grunt ) {
65

7-
grunt.loadNpmTasks( "grunt-check-modules" );
86
grunt.loadNpmTasks( "grunt-jquery-content" );
97

108
grunt.initConfig({
11-
"build-pages": {
12-
all: "page/**"
9+
"build-posts": {
10+
page: "page/**"
1311
},
1412
"build-resources": {
1513
all: "resources/**"
@@ -21,10 +19,6 @@ grunt.initConfig({
2119
})()
2220
});
2321

24-
grunt.registerTask( "clean", function() {
25-
rimraf.sync( "dist" );
26-
});
27-
2822
function getOrderMap() {
2923
var map = {},
3024
index = 0;
@@ -123,7 +117,7 @@ function contributorAttribution( post, fileName, callback ) {
123117
});
124118
}
125119

126-
jqueryContent.preprocessPost = (function() {
120+
jqueryContent.postPreprocessors.page = (function() {
127121
var orderMap = getOrderMap();
128122

129123
return function( post, postPath, callback ) {
@@ -138,7 +132,6 @@ jqueryContent.preprocessPost = (function() {
138132
};
139133
})();
140134

141-
grunt.registerTask( "build", [ "build-pages", "build-resources" ] );
142-
grunt.registerTask( "build-wordpress", [ "check-modules", "clean", "build" ] );
135+
grunt.registerTask( "build", [ "build-posts", "build-resources" ] );
143136

144137
};

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
],
2323
"dependencies": {
2424
"grunt": "0.4.5",
25-
"grunt-check-modules": "0.2.0",
26-
"grunt-jquery-content": "1.0.0",
27-
"rimraf": "2.2.8",
25+
"grunt-jquery-content": "2.0.0",
2826
"spawnback": "1.0.0"
2927
}
3028
}

0 commit comments

Comments
 (0)