JSPM

  • Created
  • Published
  • Downloads 196478
  • Score
    100M100P100Q204775F
  • License MIT

The Bower config reader and writer.

Package Exports

  • bower-config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bower-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bower-config Build Status

The Bower config (.bowerrc) reader and writer.

The config spec can be read here.

Install

$ npm install --save bower-config

Usage

.load(overwrites)

Loads the bower configuration from the configuration files.

Configuration is overwritten (after camelcase normalisation) with overwrites argument.

This method overwrites following environment variables:

  • HTTP_PROXY with proxy configuration variable
  • HTTPS_PROXY with https-proxy configuration variable
  • NO_PROXY with no-proxy configuration variable

It also clears http_proxy, https_proxy, and no_proxy environment variables.

To restore those variables you can use restore method.

restore()

Restores environment variables overwritten by .load method.

.toObject()

Returns a deep copy of the underlying configuration object. The returned configuration is normalised. The object keys will be camelCase.

#create(cwd)

Obtains a instance where cwd is the current working directory (defaults to process.cwd);

var config = require('bower-config').create();
// You can also specify a working directory
var config2 = require('bower-config').create('./some/path');

#read(cwd, overrides)

Alias for:

var configObject = (new Config(cwd)).load(overrides).toJson();

License

Released under the MIT License.