Skip to content

Commit

Permalink
Merge pull request #529 from microsoft/aeschli/productIconThemes
Browse files Browse the repository at this point in the history
Support productIconThemes
  • Loading branch information
joaomoreno committed Jan 21, 2021
2 parents 06156a8 + 24f4a24 commit 7b3b237
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/package.ts
Expand Up @@ -359,6 +359,7 @@ export class TagsProcessor extends BaseProcessor {

const colorThemes = doesContribute('themes') ? ['theme', 'color-theme'] : [];
const iconThemes = doesContribute('iconThemes') ? ['theme', 'icon-theme'] : [];
const productIconThemes = doesContribute('productIconThemes') ? ['theme', 'product-icon-theme'] : [];
const snippets = doesContribute('snippets') ? ['snippet'] : [];
const keybindings = doesContribute('keybindings') ? ['keybindings'] : [];
const debuggers = doesContribute('debuggers') ? ['debuggers'] : [];
Expand Down Expand Up @@ -394,6 +395,7 @@ export class TagsProcessor extends BaseProcessor {
...keywords,
...colorThemes,
...iconThemes,
...productIconThemes,
...snippets,
...keybindings,
...debuggers,
Expand Down
19 changes: 19 additions & 0 deletions src/test/package.test.ts
Expand Up @@ -916,6 +916,25 @@ describe('toVsixManifest', () => {
});
});

it('should automatically add product-icon-theme tag', () => {
const manifest = {
name: 'test',
publisher: 'mocha',
version: '0.0.1',
engines: Object.create(null),
contributes: {
productIconThemes: [{ id: 'fakeicons', label: 'fakeicons', path: 'fake.icons' }],
},
};

return _toVsixManifest(manifest, [])
.then(parseXmlManifest)
.then(result => {
const tags = result.PackageManifest.Metadata[0].Tags[0].split(',') as string[];
assert(tags.some(tag => tag === 'product-icon-theme'));
});
});

it('should automatically add language tag with activationEvent', () => {
const manifest = {
name: 'test',
Expand Down

0 comments on commit 7b3b237

Please sign in to comment.