read-pubspec
v7.0.3
Published
Read a pubspec.yaml file
Maintainers
Readme
read-pubspec
Read a pubspec.yaml file
Install
$ npm install read-pubspecUsage
import path from 'node: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?)
Returns a Promise<Pubspec> with the parsed YAML.
options
Type: ReadPubspecOptions
options.cwd
Type: string
Default: process.cwd()
Current working directory
