Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
feat(badges): included the node.js logo in the badge generated to com…
Browse files Browse the repository at this point in the history
…municate the engines range
  • Loading branch information
travi committed Dec 16, 2021
1 parent e9eb84b commit b76c020
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/enhancers/engines-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ suite('engines enhancer', () => {

assert.equal(scripts['lint:engines'], 'ls-engines');
assert.deepEqual(devDependencies, ['ls-engines']);
assert.deepEqual(badges.consumer.node, {img: `https://img.shields.io/node/v/${projectName}.svg`, text: 'node'});
assert.deepEqual(
badges.consumer.node,
{img: `https://img.shields.io/node/v/${projectName}?logo=node.js`, text: 'node'}
);
});
});
2 changes: 1 addition & 1 deletion src/enhancers/engines.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export async function lift({projectRoot}) {
return {
devDependencies: ['ls-engines'],
scripts: {'lint:engines': 'ls-engines'},
badges: {consumer: {node: {img: `https://img.shields.io/node/v/${name}.svg`, text: 'node'}}}
badges: {consumer: {node: {img: `https://img.shields.io/node/v/${name}?logo=node.js`, text: 'node'}}}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Then('the engines badge is added to the consumer group', async function () {
assert.deepEqual(
badges.consumer.node,
{
img: `https://img.shields.io/node/v/${this.projectName}.svg`,
img: `https://img.shields.io/node/v/${this.projectName}?logo=node.js`,
text: 'node'
}
);
Expand Down

0 comments on commit b76c020

Please sign in to comment.