# bower-config

> The Bower config reader and writer.

Latest version **1.4.3** (published 2020-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install bower-config
pnpm add bower-config
yarn add bower-config
bun add bower-config
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: no vulnerabilities; popular repo.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.3 |
| Published | 2020-04-27 |
| First published | 2013-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 6 |
| Unpacked size | 33 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14903 |
| Author | Twitter |
| Maintainers | desandro, paulirish, satazor, sheerun, sindresorhus, wibblymat |

## Links

- npm: https://www.npmjs.com/package/bower-config
- Repository: https://github.com/bower/bower/tree/master/packages/bower-config
- Homepage: http://bower.io
- npm.io page: https://npm.io/package/bower-config

## Dependencies (6)

- [mout](https://npm.io/package/mout.md) ^1.0.0
- [osenv](https://npm.io/package/osenv.md) ^0.1.3
- [minimist](https://npm.io/package/minimist.md) ^0.2.1
- [wordwrap](https://npm.io/package/wordwrap.md) ^0.0.3
- [untildify](https://npm.io/package/untildify.md) ^2.1.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.1.3

## Recent versions

- 1.4.3 (latest) — 2020-04-27
- 1.4.2 — 2020-04-26
- 0.6.2 — 2017-09-14
- 0.5.3 — 2017-09-14
- 1.2.4 — 2017-09-13
- 1.3.2 — 2017-09-13
- 1.4.1 — 2017-09-13
- 1.4.0 — 2016-04-21
- 1.3.1 — 2016-04-01
- 1.3.0 — 2015-12-07
- 1.2.3 — 2015-11-27
- 1.2.2 — 2015-10-16
- 1.2.1 — 2015-10-14
- 1.2.0 — 2015-09-28
- 1.1.2 — 2015-09-27
- … 27 more at https://npm.io/package/bower-config/versions

## README

# bower-config

> The Bower config (`.bowerrc`) reader and writer.

[Bower](http://bower.io/) 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](http://bower.io/docs/config/#bowerrc-specification) on the website for more details. Both the `bower.json` and `.bowerrc` specifications are maintained at [github.com/bower/spec](https://github.com/bower/spec).

## Install

```sh
$ 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`);

```js
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:

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

## License

Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

---
_Source: https://npm.io/package/bower-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
