Nit-Picking Magistrate

    amazeui-doc-util

    0.7.1 • Public • Published

    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.

    Install

    npm i amazeui-doc-util

    DownloadsWeekly Downloads

    3

    Version

    0.7.1

    License

    MIT

    Last publish

    Collaborators

    • minwe