Skip to content

Commit 092d377

Browse files
committed
feat(badge): returned the status badge
1 parent 117d0f2 commit 092d377

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ after_success: 'npm run coverage:report'
1010
deploy:
1111
provider: script
1212
skip_cleanup: true
13-
script: npx semantic-release
13+
script: npx semantic-release@beta
1414
'on':
1515
all_branches: true
1616
env:

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default} from './scaffolder';

src/scaffolder.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default function ({vcs}) {
2+
return {
3+
badge: {
4+
text: 'CircleCI',
5+
link: `https://circleci.com/gh/${vcs.owner}/${vcs.name}`,
6+
img: `https://img.shields.io/circleci/project/github/${vcs.owner}/${vcs.name}/master.svg`
7+
}
8+
};
9+
}

test/unit/canary-test.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/unit/scaffolder-test.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import {assert} from 'chai';
2+
import any from '@travi/any';
3+
import scaffold from '../../src';
4+
5+
suite('scaffolder', () => {
6+
test('that the config is defined', async () => {
7+
const vcsHostOwner = any.word();
8+
const vcsHostRepositoryName = any.word();
9+
10+
assert.deepEqual(
11+
await scaffold({vcs: {owner: vcsHostOwner, name: vcsHostRepositoryName}}),
12+
{
13+
badge: {
14+
text: 'CircleCI',
15+
link: `https://circleci.com/gh/${vcsHostOwner}/${vcsHostRepositoryName}`,
16+
img: `https://img.shields.io/circleci/project/github/${vcsHostOwner}/${vcsHostRepositoryName}/master.svg`
17+
}
18+
}
19+
);
20+
});
21+
});

0 commit comments

Comments
 (0)