split web extensions

This commit is contained in:
João Moreno 2020-08-03 16:53:08 +02:00
parent e8f2b6d6ae
commit 05bdb6a975
No known key found for this signature in database
GPG key ID: 896B853774D1A575
2 changed files with 11 additions and 8 deletions

View file

@ -240,8 +240,7 @@ const excludedWebExtensions = excludedCommonExtensions.concat([
]);
const marketplaceWebExtensions = [
'ms-vscode.references-view',
'ms-vscode.github-browser'
'ms-vscode.references-view'
];
interface IBuiltInExtension {
@ -251,7 +250,9 @@ interface IBuiltInExtension {
metadata: any;
}
const builtInExtensions: IBuiltInExtension[] = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')).builtInExtensions;
const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
const builtInExtensions: IBuiltInExtension[] = productJson.builtInExtensions;
const webBuiltInExtensions: IBuiltInExtension[] = productJson.webBuiltInExtensions;
type ExtensionKind = 'ui' | 'workspace' | 'web';
interface IExtensionManifest {
@ -308,10 +309,10 @@ export function packageLocalExtensionsStream(forWeb: boolean): Stream {
}
export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream {
const marketplaceExtensionsDescriptions = (
builtInExtensions
.filter(({ name }) => (forWeb ? marketplaceWebExtensions.indexOf(name) >= 0 : true))
);
const marketplaceExtensionsDescriptions = [
...builtInExtensions.filter(({ name }) => (forWeb ? marketplaceWebExtensions.indexOf(name) >= 0 : true)),
...(forWeb ? webBuiltInExtensions : [])
];
const marketplaceExtensionsStream = minifyExtensionResources(
es.merge(
...marketplaceExtensionsDescriptions

View file

@ -118,7 +118,9 @@
},
"publisherDisplayName": "Microsoft"
}
},
}
],
"webBuiltInExtensions": [
{
"name": "ms-vscode.github-browser",
"version": "0.0.1",