File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 2929 "marked" : " 0.3.2" ,
3030 "rimraf" : " 2.2.8" ,
3131 "spawnback" : " 1.0.0" ,
32- "which" : " 1.0.5"
32+ "which" : " 1.0.5" ,
33+ "wordpress" : " 0.1.3"
3334 },
3435 "devDependencies" : {
3536 "grunt" : " 0.4.5" ,
Original file line number Diff line number Diff line change 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+ } ;
You can’t perform that action at this time.
0 commit comments