@47ng/badger 中文文档教程
Badger
嗅出 GitHub 存储库的相关徽章。
Usage
Badger 可以用作 CLI:给它一个 repo slug,它给你 Markdown 返回添加到您的 README.md
:
# Usage: badger <repo slug>
$ npx @47ng/badger franky47/douze
[![MIT License](https://img.shields.io/github/license/franky47/douze.svg?color=blue)](https://github.com/franky47/douze/blob/master/LICENSE)
[![Travis CI Build](https://img.shields.io/travis/com/franky47/douze.svg)](https://travis-ci.com/franky47/douze)
[![Average issue resolution time](https://isitmaintained.com/badge/resolution/franky47/douze.svg)](https://isitmaintained.com/project/franky47/douze)
[![Number of open issues](https://isitmaintained.com/badge/open/franky47/douze.svg)](https://isitmaintained.com/project/franky47/douze)
或者您可以以编程方式调用它:
import { getBadges, renderToMarkdown } from '@47ng/badger'
async function() {
const badges = await getBadges('47ng/badger')
console.log(renderToMarkdown(badges))
}
License
MIT< /a> - 由 François Best 用 ❤️ 制作。
???? Badger
Sniff out relevant badges for GitHub repositories.
Usage
Badger can be used as a CLI: give it a repo slug, it gives you Markdown back to add to your README.md
:
# Usage: badger <repo slug>
$ npx @47ng/badger franky47/douze
[![MIT License](https://img.shields.io/github/license/franky47/douze.svg?color=blue)](https://github.com/franky47/douze/blob/master/LICENSE)
[![Travis CI Build](https://img.shields.io/travis/com/franky47/douze.svg)](https://travis-ci.com/franky47/douze)
[![Average issue resolution time](https://isitmaintained.com/badge/resolution/franky47/douze.svg)](https://isitmaintained.com/project/franky47/douze)
[![Number of open issues](https://isitmaintained.com/badge/open/franky47/douze.svg)](https://isitmaintained.com/project/franky47/douze)
Or you can call it programmatically:
import { getBadges, renderToMarkdown } from '@47ng/badger'
async function() {
const badges = await getBadges('47ng/badger')
console.log(renderToMarkdown(badges))
}
License
MIT - Made with ❤️ by François Best.
更多