proofer
v1.0.4Proofer
A thing to render API Blueprint documents in HTML.
proof (noun) a trial impression of a page, taken from type or film and used for making corrections before final printing.
This piggy-backs off a bunch of stuff:
- Uses the emscripten build of drafter to parse apib files
- Uses Ractive for templating
- Uses Ace Editor for displaying schemas & responses
Example project
The proofer-rendered versino of the Apiary polls.apib can be found at:
http://proofer-polls-apib.surge.sh/
Usage
Command line
Usage: proofer [options]
Options:
-h, --help output usage information
-V, --version output the version number
-i, --apib [file] API Blueprint input file
-o, --output [dir] Output dir [stdout]
-t, --template [dir] Also output HTML template in conjunction with -o [default]
Programmatic usage
You can require this in and use it programmatically like so:
const proofer = require('proofer');
proofer(pathToApib, outputDir, templateToUse, callback);
outputDir and templateToUse are optional and will return the rendered JSON as the callback argument. Specifying both will output as per the command line app.
Building
# Install & build
npm install
npm run build
# Launch the index.html in your fav browser
google-chrome bin/index.html