diff --git a/src/package.ts b/src/package.ts index d960f155..f31e9689 100644 --- a/src/package.ts +++ b/src/package.ts @@ -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 { this.filesProcessed++; this.assets.push({ type: this.assetType, path: filePath }); @@ -970,6 +975,11 @@ export class ReadmeProcessor extends MarkdownProcessor { ); } + override async processFile(file: IFile): Promise { + file.path = 'extension/readme.md'; + return await super.processFile(file, file.path); + } + override async onEnd(): Promise { if (this.options.readmePath && this.filesProcessed === 0) { util.log.error(`The provided readme file (${this.options.readmePath}) could not be found.`); @@ -989,6 +999,11 @@ export class ChangelogProcessor extends MarkdownProcessor { ); } + override async processFile(file: IFile): Promise { + file.path = 'extension/changelog.md'; + return await super.processFile(file, file.path); + } + override async onEnd(): Promise { if (this.options.changelogPath && this.filesProcessed === 0) { util.log.error(`The provided changelog file (${this.options.changelogPath}) could not be found.`);