verb
Version:
Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.
21 lines (16 loc) • 451 B
JavaScript
;
/**
* Called in the `init` transform to ensure that certain
* fields are on the context.
*
* @param {Object} `verb`
*/
module.exports = function(verb) {
verb.cache.missing = verb.cache.missing || {};
if (!verb.cache.data.hasOwnProperty('licenses')) {
verb.union('messages.missing.data', ['licenses']);
}
if (!verb.cache.data.hasOwnProperty('license')) {
verb.union('messages.missing.data', ['license']);
}
};