Skip to content

Commit

Permalink
fix #1048
Browse files Browse the repository at this point in the history
  • Loading branch information
benibenj committed Oct 6, 2024
1 parent ba070b6 commit 7d84630
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,11 @@ export abstract class MarkdownProcessor extends BaseProcessor {
if (!this.regexp.test(filePath)) {
return Promise.resolve(file);
}

return await this.processFile(file, filePath);
}

protected async processFile(file: IFile, filePath: string): Promise<IFile> {
this.filesProcessed++;

this.assets.push({ type: this.assetType, path: filePath });
Expand Down Expand Up @@ -970,6 +975,11 @@ export class ReadmeProcessor extends MarkdownProcessor {
);
}

override async processFile(file: IFile): Promise<IFile> {
file.path = 'extension/readme.md';
return await super.processFile(file, file.path);
}

override async onEnd(): Promise<void> {
if (this.options.readmePath && this.filesProcessed === 0) {
util.log.error(`The provided readme file (${this.options.readmePath}) could not be found.`);
Expand All @@ -989,6 +999,11 @@ export class ChangelogProcessor extends MarkdownProcessor {
);
}

override async processFile(file: IFile): Promise<IFile> {
file.path = 'extension/changelog.md';
return await super.processFile(file, file.path);
}

override async onEnd(): Promise<void> {
if (this.options.changelogPath && this.filesProcessed === 0) {
util.log.error(`The provided changelog file (${this.options.changelogPath}) could not be found.`);
Expand Down

0 comments on commit 7d84630

Please sign in to comment.