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