プロジェクト
GitHubで見る
sindresorhus/read-package-up
概要
Read the closest package.json file
開発ツール計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- +2
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルread-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
関連プロジェクトを探す
読み込み中…