Skip to content

Commit

Permalink
refactor(badges): switch to shields by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 26, 2024
1 parent 7de622d commit 308381c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- automd:badges license color=yellow -->

[![npm version](https://flat.badgen.net/npm/v/automd?color=yellow)](https://npmjs.com/package/automd)
[![npm downloads](https://flat.badgen.net/npm/dm/automd?color=yellow)](https://npmjs.com/package/automd)
[![license](https://flat.badgen.net/github/license/unjs/automd?color=yellow)](https://github.com/unjs/automd/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/automd?color=yellow)](https://npmjs.com/package/automd)
[![npm downloads](https://img.shields.io/npm/dm/automd?color=yellow)](https://npmjs.com/package/automd)
[![license](https://img.shields.io/github/license/unjs/automd?color=yellow)](https://github.com/unjs/automd/blob/main/LICENSE)

<!-- /automd -->

Expand Down
11 changes: 5 additions & 6 deletions docs/2.generators/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ The `badges` generator generates badges for the latest npm version, npm download

<!-- automd:badges color="yellow" license name="defu" codecov bundlephobia packagephobia -->

[![npm version](https://flat.badgen.net/npm/v/defu?color=yellow)](https://npmjs.com/package/defu)
[![npm downloads](https://flat.badgen.net/npm/dm/defu?color=yellow)](https://npmjs.com/package/defu)
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/defu?color=yellow)](https://bundlephobia.com/package/defu)
[![install size](https://flat.badgen.net/packagephobia/publish/defu?color=yellow)](https://packagephobia.com/result?p=defu)
[![codecov](https://flat.badgen.net/codecov/c/github/unjs/automd?color=yellow)](https://codecov.io/gh/unjs/automd)
[![license](https://flat.badgen.net/github/license/unjs/automd?color=yellow)](https://github.com/unjs/automd/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/defu?color=yellow)](https://npmjs.com/package/defu)
[![npm downloads](https://img.shields.io/npm/dm/defu?color=yellow)](https://npmjs.com/package/defu)
[![bundle size](https://img.shields.io/bundlephobia/minzip/defu?color=yellow)](https://bundlephobia.com/package/defu)
[![codecov](https://img.shields.io/codecov/c/gh/unjs/automd?color=yellow)](https://codecov.io/gh/unjs/automd)
[![license](https://img.shields.io/github/license/unjs/automd?color=yellow)](https://github.com/unjs/automd/blob/main/LICENSE)

<!-- /automd -->

Expand Down
2 changes: 1 addition & 1 deletion src/generators/badges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const badges = defineGenerator({
const fillStr = (str: string) =>
str.replace(/{(\w+)}/g, (_, key) => ctx[key] || "");

const provider = badgeProviders[args.provider] || badgeProviders.badgen;
const provider = badgeProviders[args.provider] || badgeProviders.shields;
const providerParams = Object.entries({
color: args.color,
labelColor: args.labelColor,
Expand Down
7 changes: 3 additions & 4 deletions test/fixture/OUTPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

<!-- automd:badges bundlephobia packagephobia -->

[![npm version](https://flat.badgen.net/npm/v/automd)](https://npmjs.com/package/automd)
[![npm downloads](https://flat.badgen.net/npm/dm/automd)](https://npmjs.com/package/automd)
[![bundle size](https://flat.badgen.net/bundlephobia/minzip/automd)](https://bundlephobia.com/package/automd)
[![install size](https://flat.badgen.net/packagephobia/publish/automd)](https://packagephobia.com/result?p=automd)
[![npm version](https://img.shields.io/npm/v/automd)](https://npmjs.com/package/automd)
[![npm downloads](https://img.shields.io/npm/dm/automd)](https://npmjs.com/package/automd)
[![bundle size](https://img.shields.io/bundlephobia/minzip/automd)](https://bundlephobia.com/package/automd)

<!-- /automd -->

Expand Down

0 comments on commit 308381c

Please sign in to comment.