# browserenv-generator

> Generate a file from environment variables

Latest version **0.0.1** (published 2016-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserenv-generator
pnpm add browserenv-generator
yarn add browserenv-generator
bun add browserenv-generator
```

Provides the command `browserenv-generator`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-02-26 |
| First published | 2016-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | gorghoa |
| Maintainers | gorghoa |

## Links

- npm: https://www.npmjs.com/package/browserenv-generator
- Repository: https://github.com/gorghoa/browserenv-generator
- Homepage: https://github.com/gorghoa/env-publisher#readme
- Issues: https://github.com/gorghoa/env-publisher/issues
- npm.io page: https://npm.io/package/browserenv-generator

## Dependencies (1)

- [yargs](https://npm.io/package/yargs.md) ^4.2.0

## Recent versions

- 0.0.1 (latest) — 2016-02-26

## README

# env-publisher

generate an env js file from environment variables like this post : http://jvandemo.com/how-to-configure-your-angularjs-application-using-environment-variables/


installation 

```
npm install browserenv-generator
```


usage

```
browserenv-generator --prefix=ENV_PREFIX --outfile=/path/to/genarate/env.js
```

where

`--prefix` is the begining of one or more environment variable
`--outfile` is a path to the file to be generated


## Sample generated file

env

```
$ env
BROWSERENV_CLIENT_ID=AIE34534534534534
BROWSERENV_API_URL=http://dockerhost:3000/app/api.php?UIE
NODE_VERSION=5.7.0
HOSTNAME=5c756449fa69
TERM=xterm
NPM_CONFIG_LOGLEVEL=info
HOME=/root
…
```

command : `browserenv-generator --prefix=BROWSERENV_ --outfile=./env.js`

```
(function (window) {
  window.__env = window.__env || {};
  window.__env.CLIENT_ID = 'AIE34534534534534';
  window.__env.API_URL = 'http://dockerhost:3000/app/api.php?UIE';
}(this));

```

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