awesome-cordova-plugins/scripts/docs/dgeni/processors/readmes.js
2020-05-16 14:40:49 +02:00

20 lines
553 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/@ionic-native/', '');
});
return docs;
},
};
};