1.9.0 • Published 7 months ago

readpkg-lit v1.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

readpkg-lit

This package finds and parses the closes package.json.

Installation

$ npm i readpkg-lit
# or
$ yarn add readpkg-lit

Usage

import { readPackageUp } from 'readpkg-lit';

console.log(await readPackageUp());
// -> { packageJson: { name: '<package-name>', ... }, path: 'path/to/package.json' }

API

readPackageUp(options?) / readPackageUpSync(options?)

Returns a Promise<object|undefined> depending if a package.json file was found.

In sync mode, returns object or undefined without a promise.

options

Type: object

cwd

Type: string
Default: process.cwd()

Current working directory to start traversing the file tree up until a package.json was found.

normalize

Type: boolean
Default: true

Normalize the package.json data using normalize-package-data.

Development

(1) Install dependencies

$ npm i
# or
$ yarn

(2) Run initial validation

$ ./Taskfile.sh validate

(3) Start developing. See ./Taskfile.sh for more tasks to help you develop.


This project was set up by @jvdx/core

1.9.0

7 months ago

1.8.0

7 months ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.8

2 years ago

1.3.0

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.0

3 years ago