Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npm/libnpmconfig
Standalone library for reading/writing/managing npm configurations
https://github.com/npm/libnpmconfig
config configuration library npm
Last synced: 20 days ago
JSON representation
Standalone library for reading/writing/managing npm configurations
- Host: GitHub
- URL: https://github.com/npm/libnpmconfig
- Owner: npm
- License: isc
- Archived: true
- Created: 2018-11-04T16:59:47.000Z (over 6 years ago)
- Default Branch: latest
- Last Pushed: 2021-05-10T18:54:43.000Z (almost 4 years ago)
- Last Synced: 2024-09-27T11:27:39.806Z (5 months ago)
- Topics: config, configuration, library, npm
- Language: JavaScript
- Homepage: https://npmjs.com/package/libnpmconfig
- Size: 78.1 KB
- Stars: 1
- Watchers: 10
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# libnpmconfig
[![npm version](https://img.shields.io/npm/v/libnpmconfig.svg)](https://npm.im/libnpmconfig)
[![license](https://img.shields.io/npm/l/libnpmconfig.svg)](https://npm.im/libnpmconfig)
[![Travis](https://img.shields.io/travis/npm/libnpmconfig.svg)](https://travis-ci.org/npm/libnpmconfig)
[![Coverage Status](https://coveralls.io/repos/github/npm/libnpmconfig/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmconfig?branch=latest)[`libnpmconfig`](https://github.com/npm/libnpmconfig) is a Node.js library for
programmatically managing npm's configuration files and data.## Table of Contents
* [Example](#example)
* [Install](#install)
* [Contributing](#contributing)
* [API](#api)## Example
```js
const config = require('libnpmconfig')console.log('configured registry:', config.read({
registry: 'https://default.registry/'
}))
// => configured registry: https://registry.npmjs.org
```## Install
`$ npm install libnpmconfig`
### Contributing
The npm team enthusiastically welcomes contributions and project participation!
There's a bunch of things you can do if you want to contribute! The
[Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md)
outlines the process for community interaction and contribution. Please don't
hesitate to jump in if you'd like to, or even ask us questions if something
isn't clear.All participants and maintainers in this project are expected to follow the
[npm Code of Conduct](https://www.npmjs.com/policies/conduct), and just
generally be excellent to each other.Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
Happy hacking!
### API
##### `> read(cliOpts, builtinOpts)`
Reads configurations from the filesystem and the env and returns a
[`figgy-pudding`](https://npm.im/figgy-pudding) object with the configuration
values.If `cliOpts` is provided, it will be merged with the returned config pudding,
shadowing any read values. These are intended as CLI-provided options. Do your
own `process.argv` parsing, though.If `builtinOpts.cwd` is provided, it will be used instead of `process.cwd()` as
the starting point for config searching.