amazeui-doc-util

Amaze UI Markdown docs parsing util.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
50Nov 16, 2016Jan 14, 2015Minified + gzip package size for amazeui-doc-util in KB

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.