Create markdown from dox-ish output.
A gulp plugin for doxme.
$ npm install gulp-doxme
Read through doxme to see what happens under the hood and learn about the available options.
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("."))
;
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("."))
;
The options readme
, package
and travis
are passed to doxme:
//...
.pipe(doxme(
{ readme: true
, package: {/*...*/}
, travis: true
}))