verb
Version:
A project without documentation is like a project that doesn't exist. Verb solves this by making it dead simple to generate docs, using simple markdown templates, with zero configuration required.
28 lines (23 loc) • 688 B
JavaScript
/**
* Verb <https://github.com/assemble/verb>
* Generate markdown documentation for GitHub projects.
*
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT license.
*/
const template = require('template');
const _ = require('lodash');
/**
* Compile Lo-Dash templates.
*
* @param {String} str The templates to process.
* @param {Object} data Context for the templates
* @param {Object} settings Options to pass to Lo-Dash
* @return {String}
*
* @api public
*/
module.exports = function(str, data, options) {
var opts = _.extend({}, {delims: ['{%', '%}']}, options || {});
return template(str, data || {}, opts);
};