# config-browserify

> Browserify transform for node-config (aka. config) library

Latest version **1.0.5** (published 2015-10-13) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2015-10-13 |
| First published | 2015-07-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mathew Kurian |
| Maintainers | bluejamesbond |

## Links

- npm: https://www.npmjs.com/package/config-browserify
- npm.io page: https://npm.io/package/config-browserify

## Dependencies (3)

- [config](https://npm.io/package/config.md) ^1.14.0
- [falafel](https://npm.io/package/falafel.md) ^1.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.0

## Recent versions

- 1.0.5 (latest) — 2015-10-13
- 1.0.4 — 2015-07-08
- 1.0.3 — 2015-07-08
- 1.0.2 — 2015-07-08
- 1.0.1 — 2015-07-08
- 1.0.0 — 2015-07-08

## README

# Configify
Browserify transform for [node-config](https://github.com/lorenwest/node-config) library

### Install
```
npm install config-browserify
```

### Example
### Setup (via Grunt OR package.json)
**Gruntfile.js**
```js
var configify = require('config-browserify');
// ...
{
    // ...
	browserify: {
		options: {
			transform: [configify]
		}
	}
	// ...
}
```
**package.json**
```js
{
  "name": "mymodule",
  "browserify": {
    "transform": "config-browserify"
  }
}
```

### Usage
**ClientSide.js** (which will be bundled by browserify)
```js
var config = require('config');
global.window && console.log(config.get('Client.testProperty')); // prints `hello!`
```

**config/default.json**
```js
{
  "Client": {
  	"testProperty": "hello!"
  }
}
```

#### Important 
- For security purposes, only the `Client` level config properties can be accessible from client-side code (which is bundled by browserify)
- For support for server-side rendering frameworks, there is no support for `watchify` at the moment. The entire app must be restarted in order to get config properties which were modified since the server started.

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