amazeui-doc-util
v0.7.1
Published
Amaze UI Markdown docs parsing util.
Downloads
6
Readme
doc-util
Amaze UI Markdown docs parsing util.
Usage
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var markJSON = require('markit-json');
var docUtil = require('amazeui-doc-util');
gulp.task('markdoc', function(){
return gulp.src('./test/test.md')
.pipe(markJSON(docUtil.markedOptions))
.pipe(docUtil.applyTemplate())
.pipe($.rename(function(file) {
file.extname = '.html';
}))
.pipe(gulp.dest('./dist'));
});
.markedOptions
marked options for Amaze UI docs.
.applyTemplate(tpl, data)
tpl
: Handlebars template, default is default.hbs.data
: data pass to tpl.
In default tpl, you can set:
{
head: '', // code insert to HTML <head>
footer: '', // code insert before HTML </body>
pluginTitle: '',
pluginDesc: '',
}
Custom data will extend with markJSON()
's result and pass to template.