MCPcopy Create free account
hub / github.com/cn-docs/vueuse / updateCountBadge

Function updateCountBadge

scripts/utils.ts:225–230  ·  view source on GitHub ↗
(indexes: PackageIndexes)

Source from the content-addressed store, hash-verified

223}
224
225export async function updateCountBadge(indexes: PackageIndexes) {
226 const functionsCount = indexes.functions.filter(i => !i.internal).length
227 const url = `https://img.shields.io/badge/-${functionsCount}%20functions-13708a`
228 const data = await $fetch(url, { responseType: 'text' })
229 await fs.writeFile(join(DIR_ROOT, 'packages/public/badge-function-count.svg'), data, 'utf-8')
230}
231
232export async function updatePackageJSON(indexes: PackageIndexes) {
233 const { version } = JSON.parse(await fs.readFile('package.json', { encoding: 'utf8' }))

Callers 1

runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected