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

Function updateIndexREADME

scripts/utils.ts:170–181  ·  view source on GitHub ↗
({ packages, functions }: PackageIndexes)

Source from the content-addressed store, hash-verified

168}
169
170export async function updateIndexREADME({ packages, functions }: PackageIndexes) {
171 let readme = await fs.readFile('README.md', 'utf-8')
172
173 const functionsCount = functions.filter(i => !i.internal).length
174
175 readme = readme.replace(
176 /img\.shields\.io\/badge\/-(.+?)%20functions/,
177 `img.shields.io/badge/-${functionsCount}%20functions`,
178 ).trim().replace(/\r\n/g, '\n')
179
180 await fs.writeFile('README.md', `${readme}\n`, 'utf-8')
181}
182
183export async function updateFunctionsMD({ packages, functions }: PackageIndexes) {
184 let mdAddons = await fs.readFile('packages/add-ons.md', 'utf-8')

Callers 1

runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected