Giter VIP home page Giter VIP logo

vuepress-plugin-raml-loader's Introduction

Vuepress plugin to parse RAML files and inject them as markdown

vuepress-plugin-raml-loader

Features

  • reads *.raml 1.0 and 0.8 formatted files and referenced includes
  • intermediate results are rendered as markdown enabling existing vuepress markdown related features such as 'auto' search and sidenav menu generation on raml files
  • raml can be mapped to arbitrary markdown using lodash templates
  • loaded raml content is represented as a simple JSON object and can be preprocessed for easier template rendering
  • loaded raml content as JSON can be emitted as a resource file for consumption by other components such as an interactive API tool
  • supports Webpack HMR when RAML file or its includes are edited in vuepress 'dev' mode
  • Webpack loaders such as the parser and JSON template renderer can be used stand-alone if desired

Getting Started

install the plugin

$ npm install --save-dev vuepress-plugin-raml-loader

add patterns and plugins to .vuepress/config.js

module.exports = {
  patterns: ['**/*.md', '**/*.vue', '**/*.raml'],
  plugins: [
    require('vuepress-plugin-raml-loader')
  ]
}

add *.raml files along side your *.md files

Options

The default templates can be overridden by providing a function that returns preloaded compiled templates as compiledTemplate wrapped in a Promise. See prepareDefaultTemplates() in the source code for guidance.

Caveats

  • Only works with Vuepress config.js#patterns; it would be more clear if it could add the raml as additionalPages (requires a Vuepress core change). Furthermore it currently duplicates some code frjom vuepress/core.
  • Uses the deprecated raml-1-parser that does not support OAS.
  • markdown templates might be more intuitive if they were in Vue

vuepress-plugin-raml-loader's People

Contributors

sullivanpt avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.