mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
14 lines
494 B
JavaScript
14 lines
494 B
JavaScript
module.exports = function fixupProjectRelativePath(API_DOC_TYPES) {
|
|
return {
|
|
$runAfter: ['readTypeScriptModules'],
|
|
$runBefore: ['processing-docs'],
|
|
$process(docs) {
|
|
docs.forEach(doc => {
|
|
if (API_DOC_TYPES.indexOf(doc.docType) !== -1 && doc.fileInfo && doc.fileInfo.realFilePath) {
|
|
// this is an API doc - so fix up its real path
|
|
doc.fileInfo.projectRelativePath = 'packages/' + doc.fileInfo.projectRelativePath;
|
|
}
|
|
});
|
|
}
|
|
};
|
|
};
|