1.4.3 • Published 4 years ago

bower-config v1.4.3

Weekly downloads
339,665
License
MIT
Repository
github
Last release
4 years ago

bower-config

The Bower config (.bowerrc) reader and writer.

Bower can be configured using JSON in a .bowerrc file. For example:

{
  "directory": "app/components/",
  "timeout": 120000,
  "registry": {
    "search": [
      "http://localhost:8000",
      "https://registry.bower.io"
    ]
  }
}

View the complete .bowerrc specification on the website for more details. Both the bower.json and .bowerrc specifications are maintained at github.com/bower/spec.

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.

1.4.3

4 years ago

1.4.2

4 years ago

0.6.2

7 years ago

0.5.3

7 years ago

1.2.4

7 years ago

1.3.2

7 years ago

1.4.1

7 years ago

1.4.0

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.3

8 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.6.1

9 years ago

0.6.0

9 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

11 years ago

0.4.5

11 years ago

0.4.4

11 years ago

0.4.3

11 years ago

0.4.2

11 years ago

0.4.1

11 years ago

0.4.0

11 years ago

0.3.5

11 years ago

0.3.4

11 years ago

0.3.3

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.0-rc.2

11 years ago

0.2.0-rc.1

11 years ago

0.1.0-rc.5

11 years ago

0.1.0-rc.4

11 years ago

0.1.0-rc.3

11 years ago

0.1.0-rc.2

11 years ago

0.1.0-rc.1

11 years ago