5.1.0 • Published 6 days ago

read-pubspec v5.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
6 days ago

read-pubspec

Read a pubspec.yaml file

Install

$ npm install read-pubspec

Usage

import path from 'path';
import { readPubspec } from 'read-pubspec';

process.chdir(path.join(__dirname, '/test'));

console.log(await readPubspec());
//=> { name: 'root', … }

console.log(await readPubspec({ cwd: path.join(process.cwd(), '/sub') }));
//=> { name: 'sub', … }

API

readPubspec(options?, callback?)

Returns a Promise<object> with the parsed YAML.

Optionally a callback function may be used instead.

options

Type: object

options.cwd

Type: string Default: process.cwd()

Current working directory

callback

Type: Function

Optional callback with error as the first argument and the parsed YAML as the second.

5.1.0

6 days ago

5.0.1

4 months ago

5.0.0

6 months ago

4.1.1

6 months ago

4.1.0

7 months ago

4.0.1

8 months ago

3.1.1

1 year ago

3.1.0

1 year ago

4.0.0

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

2 years ago

2.2.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.0

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago