https://github.com/afeiship/read-pkg-json
Read package.json file.
https://github.com/afeiship/read-pkg-json
cjs esm json npm package pkg read
Last synced: 11 months ago
JSON representation
Read package.json file.
- Host: GitHub
- URL: https://github.com/afeiship/read-pkg-json
- Owner: afeiship
- License: mit
- Created: 2019-06-15T15:29:49.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T02:22:50.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T12:29:48.648Z (about 1 year ago)
- Topics: cjs, esm, json, npm, package, pkg, read
- Language: TypeScript
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# read-pkg-json
> Read package.json file.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```shell
npm install @jswork/read-pkg-json
```
## usage
```js
import readPkgJson from '@jswork/read-pkg-json';
// 1. current dir
const pkg = readPkgJson();
// 2. specify dir
const pkg = readPkgJson('path/to/your/project');
```
## types
```ts
///
```
## license
Code released under [the MIT license](https://github.com/afeiship/read-pkg-json/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/read-pkg-json
[version-url]: https://npmjs.org/package/@jswork/read-pkg-json
[license-image]: https://img.shields.io/npm/l/@jswork/read-pkg-json
[license-url]: https://github.com/afeiship/read-pkg-json/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/read-pkg-json
[size-url]: https://github.com/afeiship/read-pkg-json/blob/master/dist/index.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/read-pkg-json
[download-url]: https://www.npmjs.com/package/@jswork/read-pkg-json