use repository as linnk

fixes issue 18
This commit is contained in:
isidor 2015-10-21 11:47:18 +02:00
parent 50b31a739a
commit b55a45321c
3 changed files with 6 additions and 5 deletions

View file

@ -7,7 +7,7 @@
<Tags>${ tags }</Tags>
<GalleryFlags>Public</GalleryFlags>
<Properties>
<% if (links.homepage) { %><Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="${ links.homepage }" /><% } %>
<% if (links.repository) { %><Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="${ links.repository }" /><% } %>
</Properties>
<% if (license) { %><License>${ license }</License><% } %>
<% if (icon) { %><Icon>${ icon }</Icon><% } %>

View file

@ -60,7 +60,7 @@ class MainProcessor extends BaseProcessor {
publisher: manifest.publisher,
description: manifest.description || '',
tags: (manifest.keywords || []).concat('vscode').join(','),
links: { homepage: manifest.homepage }
links: { repository: manifest.repository }
});
}
}

View file

@ -175,14 +175,15 @@ describe('toVsixManifest', () => {
});
});
it('should add homepage link property', () => {
it('should add repository link property', () => {
const manifest = {
name: 'test',
publisher: 'mocha',
version: '0.0.1',
description: 'test extension',
engines: Object.create(null),
homepage: 'https://homepage/test'
homepage: 'https://homepage/test',
repository: 'https://repository/test'
};
return toVsixManifest(manifest, [])
@ -193,7 +194,7 @@ describe('toVsixManifest', () => {
assert.ok(result.PackageManifest.Metadata[0].Properties[0].Property);
assert.equal(result.PackageManifest.Metadata[0].Properties[0].Property.length, 1);
assert.equal(result.PackageManifest.Metadata[0].Properties[0].Property[0].$.Id, 'Microsoft.VisualStudio.Services.Links.Source');
assert.equal(result.PackageManifest.Metadata[0].Properties[0].Property[0].$.Value, 'https://homepage/test');
assert.equal(result.PackageManifest.Metadata[0].Properties[0].Property[0].$.Value, 'https://repository/test');
});
});