2022-09-23 01:09:33 +00:00
|
|
|
module.exports = function fixupProjectRelativePath(API_DOC_TYPES) {
|
2018-10-17 14:45:47 +00:00
|
|
|
return {
|
|
|
|
|
$runAfter: ['readTypeScriptModules'],
|
|
|
|
|
$runBefore: ['processing-docs'],
|
|
|
|
|
$process(docs) {
|
|
|
|
|
docs.forEach(doc => {
|
2022-10-07 01:39:45 +00:00
|
|
|
if (API_DOC_TYPES.indexOf(doc.docType) !== -1 && doc.fileInfo && doc.fileInfo.realFilePath) {
|
2018-10-17 14:45:47 +00:00
|
|
|
// this is an API doc - so fix up its real path
|
2022-09-23 01:09:33 +00:00
|
|
|
doc.fileInfo.projectRelativePath = 'packages/' + doc.fileInfo.projectRelativePath;
|
2018-10-17 14:45:47 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|