gulp-doxme
v1.8.0
Published
Create markdown from dox-ish output.
Downloads
17
Maintainers
Readme
gulp-doxme
Create markdown from dox-ish output.
A gulp plugin for doxme.
Installation
$ npm install gulp-doxme
Usage
Read through doxme to see what happens under the hood and learn about the available options.
With gulp-dox
This approach is quick and simple.
Takes a JSON file as input (such as that coming from gulp-dox).
var gulp = require("gulp");
var dox = require("gulp-dox");
var doxme = require("gulp-doxme");
var concat = require("gulp-concat");
gulp.src("*.js")
.pipe(dox())
.pipe(doxme())
.pipe(concat("Readme.md"))
.pipe(gulp.dest("."))
;
With gulp-data
This approach gives you more power. Among other things it allows you to process output from dox before passing it to gulp-doxme.
Takes file.data
as input (for example coming from gulp-data):
var gulp = require("gulp");
var dox = require("dox");
var data = require("gulp-data");
var doxme = require("gulp-doxme");
var concat = require("gulp-concat");
gulp.src("*.js")
.pipe(data(function (file) {
return dox.parseComments(file.contents.toString());
}))
.pipe(doxme())
.pipe(concat("Readme.md"))
.pipe(gulp.dest("."))
;
Passing options
The options readme
, package
and travis
are passed to doxme:
//...
.pipe(doxme(
{ readme: true
, package: {/*...*/}
, travis: true
}))