awesome-cordova-plugins/scripts/docs/processors/readmes.js
2017-03-23 22:07:59 -04:00

20 lines
538 B
JavaScript

"use strict";
module.exports = function readmes(renderDocsProcessor) {
return {
name: 'readmes',
description: 'Create jekyll includes',
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: docs => {
// pretty up and sort the docs object for menu generation
docs = docs.filter(doc => (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page');
docs.forEach(doc => {
doc.outputPath = doc.outputPath.replace('src/', '');
});
return docs;
}
};
};