2019.8.14 • Published 5 years ago

env-strip v2019.8.14

Weekly downloads
-
License
Unlicense
Repository
-
Last release
5 years ago

npm.io

strip comments and blank lines from env file

Installation

$ [sudo] npm i -g env-strip

Pros

  • Docker compatible environment file without comments, blank lines and double quotes

Scripts usage

commandusage
env-stripusage: env-strip path

Examples

.env

SECRET_KEY="https://www.youtube.com/channel/UCTZUTvv_1Onm-f-533Hyurw"

# postgres settings:
DB_NAME="name" # comment
DB_USER="postgres" # comment
DB_HOST="127.0.0.1" # comment
DB_PORT=5432 # comment
$ env-strip .env
SECRET_KEY=https://www.youtube.com/channel/UCTZUTvv_1Onm-f-533Hyurw
DB_NAME=name
DB_USER=postgres
DB_HOST=127.0.0.1
DB_PORT=5432

stdin

$ find . \( -name .env.base -o -name ".env.prod.*" \) -exec cat {} \; | env-strip - > .env.prod