Socket
Socket
Sign inDemoInstall

bower-config

Package Overview
Dependencies
8
Maintainers
6
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bower-config

The Bower config reader and writer.


Version published
Weekly downloads
200K
decreased by-0.26%
Maintainers
6
Install size
575 kB
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 27 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc