badges
The badges
generator generates badges for the latest npm version, npm download statistics, code coverage, and bundle size.
Example
Input
<!-- automd:badges color="yellow" license name="defu" codecov bundlephobia packagephobia -->
<!-- /automd -->
Output
<!-- automd:badges color="yellow" license name="defu" codecov bundlephobia packagephobia -->
[](https://npmjs.com/package/defu)
[](https://npm.chart.dev/defu)
[](https://bundlephobia.com/package/defu)
[](https://packagephobia.com/result?p=defu)
[](https://codecov.io/gh/unjs/automd)
[](https://github.com/unjs/automd/blob/main/LICENSE)
<!-- /automd -->
Arguments
name
string
The npm package name. By default tries to infer from
package.json
github
string
Github repository name. By default tries to infer from
package.json
license
boolean
Show license badge (requires
github
)licenseBranch
string
Branch to use for license badge defaults to
main
bundlephobia
boolean
Show Bundlephobia badge (requires
name
)codecov
boolean
Enable Codecov badge (requires
github
)no-npmDownloads
boolean
Hide npm downloads badge
no-npmVersion
boolean
Hide npm version badge
provider
string
Can be one of
shields
(for shields.io) or badgen
/ badgenClassic
(for badgen.net). Default is badgen
.
You can use additional args
color
, labelColor
to customize style. For provider specific params, use styleParams
.