Détail du package

libnpmconfig

npm1.4mISCobsolète1.2.1

This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config

Standalone library for reading/writing/managing npm configurations

readme

libnpmconfig npm version license Travis AppVeyor Coverage Status

libnpmconfig is a Node.js library for programmatically managing npm's configuration files and data.

Example

const config = require('libnpmconfig')

console.log('configured registry:', config.read({
  registry: 'https://default.registry/'
}))
// => configured registry: https://registry.npmjs.org

Install

$ npm install libnpmconfig

Table of Contents

API

> read(cliOpts, builtinOpts)

Reads configurations from the filesystem and the env and returns a 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.

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.2.1 (2018-11-13)

Bug Fixes

  • proj: make sure proj object exists (8fe2663)

1.2.0 (2018-11-13)

Features

  • cache: improved cache parsing/handling (63ba3bb)

1.1.1 (2018-11-04)

Bug Fixes

  • config: rework load order and support builtin configs (5ef1ac5)

1.1.0 (2018-11-04)

Features

  • userconfig: allow passing in userconfig from env (f613877)

1.0.0 (2018-11-04)

Features

  • api: add read() function (710426b)