프로젝트
GitHub에서 보기
sindresorhus/read-package-up
소개
Read the closest package.json file
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalread-package-up
Read the closest package.json file
Why
Install
npm install read-package-up
Usage
import {readPackageUp} from 'read-package-up';
console.log(await readPackageUp());
/*
{
packageJson: {
name: 'awesome-package',
version: '1.0.0',
…
},
path: '/Users/sindresorhus/dev/awesome-package/package.json'
}
*/
API
readPackageUp(options?)
Returns a Promise<object>, or Promise<undefined> if no package.json was found.
readPackageUpSync(options?)
Returns the result object, or undefined if no package.json was found.
options
Type: object
cwd
Type: URL | string
Default: process.cwd()
The directory to start looking for a package.json file.
normalize
Type: boolean
Default: true
Normalize the package data.
Related
- read-pkg - Read a package.json file
- package-up - Find the closest package.json file
- find-up - Find a file by walking up parent directories
- package-config - Get namespaced config from the closest package.json
관련 프로젝트 살펴보기
불러오는 중…