Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/herrmannplatz/env-replace

Will replace all environment variables in a given file
https://github.com/herrmannplatz/env-replace

Last synced: 2 months ago
JSON representation

Will replace all environment variables in a given file

Awesome Lists containing this project

README

        

# env-replace

[![npm version](https://badge.fury.io/js/env-replace.svg)](https://badge.fury.io/js/env-replace) [![Build Status](https://travis-ci.org/herrmannplatz/env-replace.svg?branch=master)](https://travis-ci.org/herrmannplatz/env-replace)

> Replaces all environment variable placeholders in a file

## Install

```shell
npm install env-replace
```

## Usage

```shell
npx env-replace config/*.yaml
```

```javascript
const envReplace = require('env-replace')

envReplace('config/*.yaml')
```

## API

### envReplace(pattern)

Replaces environment variable placeholders in any file that matches the pattern.

#### pattern

Type: `string`

Glob that defines which files are processed.