Skip to content

Commit

Permalink
Improved support for VsCode frontend extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Bozzini <federico.bozzini@gmail.com>
  • Loading branch information
federicobozzini committed Oct 11, 2022
1 parent fb11a22 commit cd5e7f9
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,17 @@ export class PluginVsCodeDirectoryHandler implements PluginDeployerDirectoryHand

async handle(context: PluginDeployerDirectoryHandlerContext): Promise<void> {
await this.copyDirectory(context);
context.pluginEntry().accept(PluginDeployerEntryType.BACKEND);
const types: PluginDeployerEntryType[] = [];
const packageJson: PluginPackage = context.pluginEntry().getValue('package.json');
if (packageJson.main) {
types.push(PluginDeployerEntryType.BACKEND);
}
if (packageJson.browser) {
types.push(PluginDeployerEntryType.FRONTEND);
}

context.pluginEntry().accept(...types);
return Promise.resolve();
}

protected async copyDirectory(context: PluginDeployerDirectoryHandlerContext): Promise<void> {
Expand Down

0 comments on commit cd5e7f9

Please sign in to comment.