@apielements/apib-serializer

0.16.3 • Public • Published

API Elements: API Blueprint Serializer

NPM version License

This adapter provides support for serializing API Blueprint in Fury.js from refract elements.

Install

$ npm install @apielements/apib-serializer

Usage

Async

import fury from 'fury';
import apibSerializer from '@apielements/apib-serializer';

fury.use(apibSerializer);

// Assume `api` is a Minim element instance, e.g. from `fury.parse(...)`
fury.serialize({ api }, (err, content) => {
  fs.write('serialized.apib', content, 'utf8');
});

Sync

import fury from 'fury';
import apibSerializer from '@apielements/apib-serializer';

fury.use(apibSerializer);

try {
  // Assume `api` is a Minim element instance, e.g. from `fury.parse(...)`
  const content = fury.serializeSync({ api });
  fs.write('serialized.apib', content, 'utf8');
} catch (error) {
  console.log(error);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @apielements/apib-serializer

Weekly Downloads

311

Version

0.16.3

License

MIT

Unpacked Size

22.6 kB

Total Files

8

Last publish

Collaborators

  • kylef
  • apiary-sre