refactor(docs-infra): refactors `createOverviewDump` (#37141)
This commit removes the dependency on the `lodash` module and refactors the `createOverviewDump` method. PR Close #37141
This commit is contained in:
parent
593e07bd21
commit
22d80a6780
|
@ -1,23 +1,23 @@
|
|||
var _ = require('lodash');
|
||||
|
||||
module.exports = function createOverviewDump() {
|
||||
|
||||
return {
|
||||
$runAfter: ['processing-docs'],
|
||||
$runBefore: ['docs-processed'],
|
||||
$process: function(docs) {
|
||||
var overviewDoc = {
|
||||
const overviewDoc = {
|
||||
id: 'overview-dump',
|
||||
aliases: ['overview-dump'],
|
||||
path: 'overview-dump',
|
||||
outputPath: 'overview-dump.html',
|
||||
modules: []
|
||||
};
|
||||
_.forEach(docs, function(doc) {
|
||||
|
||||
docs.forEach(doc => {
|
||||
if (doc.docType === 'package') {
|
||||
overviewDoc.modules.push(doc);
|
||||
}
|
||||
});
|
||||
|
||||
docs.push(overviewDoc);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue