Drafter can be installed from NPM. If you want to use Drafter from a web browser, check out drafter.js.
$ npm install drafter
var drafter = ;
Once you've included drafter, you can parse an API Blueprint asynchronously:
var options =generateSourcemap: true;drafter;
Alternatively, you can use Drafter synchronously:
tryvar result = drafter;console;catch errconsole;
Options can be passed to the parser as an optional second argument to both the asynchronous and synchronous interfaces:
var options =generateSourceMap: truedrafter;
The available options are:
||Require parsed blueprints have a title (default: false)|
||Enable sourcemap generation (default: false)|
||Set the output structure type as either
ast option is deprecated in favour of
MIT License. See the LICENSE file.