node-wp-to-json
Simple nodeJS script to transform you WordPress API into a single JSON file.
Installation
npm install --save wp-to-json
Usage
wpToJson
is a simple WordPress api caller to save data in JSON file. It will basically call the /option
route to know all pages that should be retrieved. Then, it will performs a call on each post to gather data.
var wpToJson = ;
You can now configure it by passing an array of objects like this:
;
You can also use the script in a Gulp task:
{ 'use strict'; var gulp = ; var wpToJson = ; { return ; } gulp;};