Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grrr-amsterdam/12g-env-template
npm package to create a template / example file based on a local .env file | https://www.npmjs.com/package/12g-env-template
https://github.com/grrr-amsterdam/12g-env-template
Last synced: 4 days ago
JSON representation
npm package to create a template / example file based on a local .env file | https://www.npmjs.com/package/12g-env-template
- Host: GitHub
- URL: https://github.com/grrr-amsterdam/12g-env-template
- Owner: grrr-amsterdam
- License: mit
- Created: 2017-05-24T04:04:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T11:49:10.000Z (over 4 years ago)
- Last Synced: 2024-11-06T07:08:18.420Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 111 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 12g-env-template
[![Greenkeeper badge](https://badges.greenkeeper.io/grrr-amsterdam/12g-env-template.svg)](https://greenkeeper.io/)
This package creates a template file based on your local `.env` file.
It will empty out all values, but it will leave comments and newlines in.[![Greenkeeper badge](https://badges.greenkeeper.io/grrr-amsterdam/12g-env-template.svg)](https://greenkeeper.io/)
## Usage
Install the dependency:
```bash
$ npm install --save 12g-env-template
```Then require it in your code:
```
var template = require('12g-env-template');
```Then create a template file:
```
template.create()
```Or with options:
```
template.create('.env.production', '.env.example')
```## Methods
### `.create([input file], [output file])`
By default, it will take `.env` as input and use `.env.template` as output.### `.exists()`
Returns whether the template file already exists.