kopia lustrzana https://github.com/badgen/badgen.net
Merge branch '2.0' of https://github.com/badgen/badgen.net into 2.0
commit
faf1e2b32b
|
@ -4,13 +4,13 @@ import { badgenServe } from '../libs/badgen-serve'
|
|||
|
||||
export const title = 'Mozilla Add-on'
|
||||
|
||||
export const examples = [
|
||||
['/amo/v/markdown-viewer-chrome', 'version'],
|
||||
['/amo/users/markdown-viewer-chrome', 'users'],
|
||||
['/amo/rating/markdown-viewer-chrome', 'rating'],
|
||||
['/amo/stars/markdown-viewer-chrome', 'stars'],
|
||||
['/amo/reviews/markdown-viewer-chrome', 'reviews'],
|
||||
]
|
||||
export const examples = {
|
||||
'/amo/v/markdown-viewer-chrome': 'version',
|
||||
'/amo/users/markdown-viewer-chrome': 'users',
|
||||
'/amo/rating/markdown-viewer-chrome': 'rating',
|
||||
'/amo/stars/markdown-viewer-chrome': 'stars',
|
||||
'/amo/reviews/markdown-viewer-chrome': 'reviews',
|
||||
}
|
||||
|
||||
export const handlers = {
|
||||
'/amo/:topic/:name': handler
|
||||
|
|
|
@ -5,37 +5,37 @@ import got from '../libs/got'
|
|||
import { version, millify } from '../libs/utils'
|
||||
import { badgenServe, BadgenServeHandlerArgs as Args } from '../libs/badgen-serve'
|
||||
|
||||
export const examples = [
|
||||
['/github/release/babel/babel', 'latest release'],
|
||||
['/github/release/babel/babel/stable', 'latest stable release'],
|
||||
['/github/tag/micromatch/micromatch', 'latest tag'],
|
||||
['/github/watchers/micromatch/micromatch', 'watchers'],
|
||||
['/github/status/micromatch/micromatch', 'status'],
|
||||
['/github/status/micromatch/micromatch/gh-pages', 'status (branch)'],
|
||||
['/github/status/micromatch/micromatch/f4809eb6df80b', 'status (commit)'],
|
||||
['/github/stars/micromatch/micromatch', 'stars'],
|
||||
['/github/forks/micromatch/micromatch', 'forks'],
|
||||
['/github/issues/micromatch/micromatch', 'issues'],
|
||||
['/github/open-issues/micromatch/micromatch', 'open issues'],
|
||||
['/github/closed-issues/micromatch/micromatch', 'closed issues'],
|
||||
['/github/label-issues/nodejs/node/ES%20Modules', 'issues by label'],
|
||||
['/github/label-issues/atom/atom/help-wanted/open', 'open issues by label'],
|
||||
['/github/label-issues/rust-lang/rust/B-RFC-approved/closed', 'closed issues by label'],
|
||||
['/github/prs/micromatch/micromatch', 'PRs'],
|
||||
['/github/open-prs/micromatch/micromatch', 'open PRs'],
|
||||
['/github/closed-prs/micromatch/micromatch', 'closed PRs'],
|
||||
['/github/merged-prs/micromatch/micromatch', 'merged PRs'],
|
||||
['/github/commits/micromatch/micromatch', 'commits count'],
|
||||
['/github/last-commit/micromatch/micromatch', 'last commit'],
|
||||
['/github/branches/micromatch/micromatch', 'branches'],
|
||||
['/github/releases/micromatch/micromatch', 'releases'],
|
||||
['/github/tags/micromatch/micromatch', 'tags'],
|
||||
['/github/license/micromatch/micromatch', 'license'],
|
||||
['/github/contributors/micromatch/micromatch', 'contributers'],
|
||||
['/github/assets-dl/electron/electron', 'latest assets downloads'],
|
||||
['/github/dependents-repo/micromatch/micromatch', 'repository depentents'],
|
||||
['/github/dependents-pkg/micromatch/micromatch', 'package dependents']
|
||||
]
|
||||
export const examples = {
|
||||
'/github/release/babel/babel': 'latest release',
|
||||
'/github/release/babel/babel/stable': 'latest stable release',
|
||||
'/github/tag/micromatch/micromatch': 'latest tag',
|
||||
'/github/watchers/micromatch/micromatch': 'watchers',
|
||||
'/github/status/micromatch/micromatch': 'status',
|
||||
'/github/status/micromatch/micromatch/gh-pages': 'status (branch)',
|
||||
'/github/status/micromatch/micromatch/f4809eb6df80b': 'status (commit)',
|
||||
'/github/stars/micromatch/micromatch': 'stars',
|
||||
'/github/forks/micromatch/micromatch': 'forks',
|
||||
'/github/issues/micromatch/micromatch': 'issues',
|
||||
'/github/open-issues/micromatch/micromatch': 'open issues',
|
||||
'/github/closed-issues/micromatch/micromatch': 'closed issues',
|
||||
'/github/label-issues/nodejs/node/ES%20Modules': 'issues by label',
|
||||
'/github/label-issues/atom/atom/help-wanted/open': 'open issues by label',
|
||||
'/github/label-issues/rust-lang/rust/B-RFC-approved/closed': 'closed issues by label',
|
||||
'/github/prs/micromatch/micromatch': 'PRs',
|
||||
'/github/open-prs/micromatch/micromatch': 'open PRs',
|
||||
'/github/closed-prs/micromatch/micromatch': 'closed PRs',
|
||||
'/github/merged-prs/micromatch/micromatch': 'merged PRs',
|
||||
'/github/commits/micromatch/micromatch': 'commits count',
|
||||
'/github/last-commit/micromatch/micromatch': 'last commit',
|
||||
'/github/branches/micromatch/micromatch': 'branches',
|
||||
'/github/releases/micromatch/micromatch': 'releases',
|
||||
'/github/tags/micromatch/micromatch': 'tags',
|
||||
'/github/license/micromatch/micromatch': 'license',
|
||||
'/github/contributors/micromatch/micromatch': 'contributers',
|
||||
'/github/assets-dl/electron/electron': 'latest assets downloads',
|
||||
'/github/dependents-repo/micromatch/micromatch': 'repository depentents',
|
||||
'/github/dependents-pkg/micromatch/micromatch': 'package dependents',
|
||||
}
|
||||
|
||||
export const handlers = {
|
||||
'/github/:topic<watchers|stars|forks|branches|releases|tags|tag|license>/:owner/:repo': repoStats,
|
||||
|
|
|
@ -2,10 +2,10 @@ import got from '../libs/got'
|
|||
import { version, versionColor } from '../libs/utils'
|
||||
import { badgenServe } from '../libs/badgen-serve'
|
||||
|
||||
export const examples = [
|
||||
['/homebrew/v/fish', 'version'],
|
||||
['/homebrew/v/cake', 'version']
|
||||
]
|
||||
export const examples = {
|
||||
'/homebrew/v/fish': 'version',
|
||||
'/homebrew/v/cake': 'version'
|
||||
}
|
||||
|
||||
export const handlers = {
|
||||
'/homebrew/v/:pkg': handler
|
||||
|
|
1
index.ts
1
index.ts
|
@ -30,6 +30,7 @@ const server = http.createServer(async (req, res) => {
|
|||
return serve404(req, res)
|
||||
})
|
||||
|
||||
// Auto run
|
||||
if (require.main === module) {
|
||||
server.listen(3000)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue