rename variable called path to includePath to avoid conflict with path package

This commit is contained in:
Fabio Berger
2018-03-30 14:46:15 +02:00
parent 9c856de49c
commit 95eb114051

View File

@@ -122,14 +122,16 @@ export const postpublishUtils = {
},
adjustFileIncludePaths(fileIncludes: string[], cwd: string): string[] {
const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => {
let path = _.startsWith(fileInclude, './') ? `${cwd}/${fileInclude.substr(2)}` : `${cwd}/${fileInclude}`;
let includePath = _.startsWith(fileInclude, './')
? `${cwd}/${fileInclude.substr(2)}`
: `${cwd}/${fileInclude}`;
// HACK: tsconfig.json needs wildcard directory endings as `/**/*`
// but TypeDoc needs it as `/**` in order to pick up files at the root
if (_.endsWith(path, '/**/*')) {
path = path.slice(0, -2);
if (_.endsWith(includePath, '/**/*')) {
includePath = includePath.slice(0, -2);
}
return path;
return includePath;
});
return fileIncludesAdjusted;
},