raml2html 安装,GitHub - walling/gulp-raml2html: A simple RAML to HTML documentation generator, wrapped...

gulp-raml2html is back in the game. But you can still help us by submitting PRs on develop branch. Thanks in advance!`

gulp-raml2html

68747470733a2f2f7472617669732d63692e6f72672f77616c6c696e672f67756c702d72616d6c3268746d6c2e7376673f6272616e63683d6d6173746572

bf9dc7edfd6c7d823be32da36c748b06.png

68747470733a2f2f64617669642d646d2e6f72672f77616c6c696e672f67756c702d72616d6c3268746d6c2f7374617475732e737667

68747470733a2f2f64617669642d646d2e6f72672f77616c6c696e672f67756c702d72616d6c3268746d6c2f6465762d7374617475732e737667

A simple gulp plugin to automate the process of generating HTML documentation based on a RAML API.

If you have any difficulties with the output of this plugin, please use the raml2html tracker.

Note: This plugin wraps raml2html.

Install

npm

npm install gulp-raml2html --save-dev

Usage

gulp basis

Gulp is a build life-cycle tool. You can configure several tasks to be ran when entering gulp [taskname] in your console ('default' task is invoked if not specified). It can also be invoked by Continuous Integration tools.

To be able to use it, your application must have a gulpfile.js with the possible tasks configured.

A typical gulpfile.js will start with:

var gulp = require('gulp');

var raml2html = require('gulp-raml2html');

Add HTML generation task

// your existing tasks

gulp.task('apidoc', function() {

return gulp.src('api.raml')

.pipe(raml2html())

.pipe(gulp.dest('build'));

});

// more tasks

Run

gulp apidoc will grab api.raml and generate a build folder with the generated HTML on it.

Example

Included in this repository. Click here to go to the "example" folder

API

supportJsonInput

Type: boolean

Default value: false

When set to true it also takes JSON files as input (generated by the RAML parser).

https

Type: boolean

Default value: false

When set to true the raml2html generator will output links to the all assets over https protocol.

License

The code for gulp-raml2html is licensed under the MIT license. See license.txt file for more info.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值