Skip to content

Commit

Permalink
fix: changed to have exclude options take precedence over comment dir…
Browse files Browse the repository at this point in the history
…ectives
  • Loading branch information
imjuni committed Aug 19, 2024
1 parent 02593fd commit 9b68e0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 9 additions & 7 deletions src/modules/commands/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ export async function bundling(buildOptions: TCommandBuildOptions, bundleOption:
project,
filePaths,
keyword: CE_INLINE_COMMENT_KEYWORD.FILE_DECLARATION_KEYWORD,
}).filter((declaration) => {
const sourceFile = project.getSourceFile(declaration.filePath);
if (sourceFile == null) {
return false;
}
})
.filter((declaration) => !exclude.isExclude(declaration.filePath))
.filter((declaration) => {
const sourceFile = project.getSourceFile(declaration.filePath);
if (sourceFile == null) {
return false;
}

return isDeclarationFile(sourceFile);
});
return isDeclarationFile(sourceFile);
});

const filenames = filePaths
.filter((filename) => include.isInclude(filename))
Expand Down
6 changes: 2 additions & 4 deletions src/templates/modules/getInlineDeclarationRenderData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ export function getInlineDeclarationRenderData(

const relativePath =
options.output != null
? addCurrentDirPrefix(
posixRelative(options.output, pathe.join(dirname, `${basename}${extname}`)),
)
: replaceSepToPosix(`.${path.posix.sep}${pathe.join(dirname, `${basename}${extname}`)}`);
? addCurrentDirPrefix(posixRelative(options.output, pathe.join(dirname, basename)))
: replaceSepToPosix(`.${path.posix.sep}${pathe.join(dirname, basename)}`);

return {
...declaration,
Expand Down

0 comments on commit 9b68e0a

Please sign in to comment.