Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raml2md

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raml2md

RAML to Markdown documentation generator

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

RAML to Markdown

NPM version

A simple RAML to Markdown documentation generator, written for Node.js. Check raml2html for a RAML to HTML generator.

Install

npm i -g raml2md

Usage

As a command line script

raml2md example.raml > example.md
raml2md -i example.raml -o example.md
raml2md -t custom-template.nunjucks -i example.raml -o example.md

As a library

Using the default templates
var raml2md = require('raml2md');
var config = raml2md.getDefaultConfig();

// source can either be a filename, file contents (string) or parsed RAML object.
// Returns a promise.
raml2md.render(source, config).then(function(result) {
    // Save the result to a file or do something else with the result
}, function(error) {
    // Output error
});
Using your own Nunjucks templates
var raml2md = require('raml2md');

// source can either be a filename, file contents (string) or parsed RAML object.
// config should be an object with at least a `template` property which is a url (relative from the working directory) to your main template,
// you can also include a processOutput function.
// Returns a promise.
raml2md.render(source, config).then(function(result) {
    // Save the result to a file or do something else with the result
}, function(error) {
    // Output error
});

If you want to use a different template language, you're better off directly using raml2obj.

Contribute

raml2md is an open source project and your contribution is very much appreciated.

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on Github and make your changes on the develop branch (or branch off of it). Please retain the code style that is used in the project.
  3. Add an example of the new feature to example.raml (if applicable)
  4. Send a pull request (with the develop branch as the target).

A big thank you goes out to everyone who helped with the project, the contributors and everyone who took the time to report issues and give feedback.

To do

This project is in an early stage. The generated Markdown is missing a lot of details but should be very usable for README's, for example.

License

raml2md is available under the MIT license. See the LICENSE file for more info.

Keywords

FAQs

Package last updated on 20 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc