0.1.5 • Published 1 year ago

@0x-jerry/load-pkg v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
    }
  }
}
0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.1

3 years ago