MCPcopy Create free account
hub / github.com/formkit/formkit / readPackageJSON

Function readPackageJSON

packages/cli/src/utils.ts:19–23  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

17}
18
19export async function readPackageJSON(dir: string) {
20 const packageJsonPath = resolve(dir, `./package.json`)
21 const raw = await readFile(packageJsonPath, 'utf-8')
22 return JSON.parse(raw)
23}
24
25export async function writePackageJSON(dir: string, data: any) {
26 const packageJsonPath = resolve(dir, `./package.json`)

Callers 2

customizePackageJsonFunction · 0.90
addDependencyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected