项目作者: wdullaer

项目描述 :
Render the RAML API spec in the slate documentation layout
高级语言: JavaScript
项目地址: git://github.com/wdullaer/raml2slate.git
创建时间: 2016-09-12T10:22:16Z
项目社区:https://github.com/wdullaer/raml2slate

开源协议:Other

下载


raml2slate NPM version Build Status Dependency Status Greenkeeper badge Deprecated Badge

Render the RAML API spec in the slate documentation layout

Deprecated

This package has been deprecated in favor of the raml2html-slate-theme for raml2html. All future development will happen there.

Introduction

This package is meant to render nice looking documentation for your REST API, based on a RAML file.
It is inspired by slate and raml2html.

The package is usable, but the API and templates might still change based upon feedback.

As of v0.0.6 only RAML 1.0 specificiations are supported.

Example

Installation

  1. $ npm install --save raml2slate

Usage

In javascript:

  1. var raml2slate = require('raml2slate');
  2. raml2slate.render({
  3. input: 'path/to/raml/file',
  4. output: 'path/to/output/directory',
  5. theme: 'path/to/optional/theme/file',
  6. logo: 'path/to/optional/png/logo'
  7. });

On the command line:

  1. raml2slate \
  2. -i 'path/to/raml/file' \
  3. -o 'path/to/output/directory' \
  4. -t 'path/to/optional/theme/file' \
  5. -l 'path/to/optional/png/logo'

You can generate a theme file to tweak using:

  1. raml2slate --generate-theme > theme.styl

TODO

  • Add schema definitions to the template
  • Convert render-markdown.js into a metalsmith plugin
  • Investigate making this fully compatible with raml2html

License

Apache-2.0 © Wouter Dullaert