We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f94a5d commit 81579ecCopy full SHA for 81579ec
package.json
@@ -29,7 +29,8 @@
29
"marked": "0.3.2",
30
"rimraf": "2.2.8",
31
"spawnback": "1.0.0",
32
- "which": "1.0.5"
+ "which": "1.0.5",
33
+ "wordpress": "0.1.3"
34
},
35
"devDependencies": {
36
"grunt": "0.4.5",
tasks/redirects.js
@@ -0,0 +1,15 @@
1
+module.exports = function( grunt ) {
2
+
3
+var wp = require( "wordpress" );
4
5
+grunt.registerTask( "deploy-redirects", function() {
6
+ var config = grunt.config( "wordpress" );
7
+ var redirects = grunt.file.exists( "redirects.json" ) ? grunt.file.readJSON( "redirects.json" ) : {};
8
+ var client = wp.createClient( config );
9
10
+ client.authenticatedCall( "jq.setRedirects", JSON.stringify( redirects ), this.async() );
11
+} );
12
13
+grunt.registerTask( "deploy", [ "wordpress-deploy", "deploy-redirects" ] );
14
15
+};
0 commit comments