Licence
MIT
Version
0.1.5
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Load Pkg
Detect the closest package.json recursively.
Example
const pkgFile = await loadPkg(path.join(__dirname, 'example/packages/pkg1'))
console.log(pkgFile)
output:
{
"path": "<root-path>/example/packages/pkg1/package.json",
"config": {}, // content of `package.json`
"monorepo": false,
"parent": {
"path": "<root-path>/example/package.json",
"config": {}, // content of `package.json`
"monorepo": true,
"parent": {
"path": "<root-path>/package.json",
"config": {}, // content of `package.json`
"monorepo": false
}
}
}