Files
awesome-cordova-plugins/scripts/docs/processors/readmes.js
T
perry 9aa7ad0221 automating readme file generation and adding it to CI
# Conflicts:
#	src/@ionic-native/plugins/googlemap/index.ts
#	src/@ionic-native/plugins/inappbrowser/index.ts
#	src/@ionic-native/plugins/media/index.ts
#	src/@ionic-native/plugins/sqlite/index.ts
2017-02-15 10:19:26 -06:00

24 lines
723 B
JavaScript

module.exports = function jekyll(renderDocsProcessor) {
return {
name: 'readmes',
description: 'Create jekyll includes',
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: function(docs) {
var currentVersion = renderDocsProcessor.extraData.version.current.name;
// pretty up and sort the docs object for menu generation
docs = docs.filter(function(doc) {
return (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page';
});
docs.forEach(function(doc, i) {
doc.npmId = doc.outputPath.replace('/README.md', '');
});
// returning docs will replace docs object in the next process
return docs;
}
};
};