Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including bower-config with all npm packages installed. Try it out:

var bowerConfig = require("bower-config")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

bower-config v1.4.3

The Bower config reader and writer.


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": [

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


$ npm install --save bower-config



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.


Restores environment variables overwritten by .load method.


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


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();


Released under the MIT License.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free