1.2.1 • Published 6 years ago

dotenv-props-tool v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

dotenv-props-tool

CLI tool that produces dotenv or properties format by mergin values and adding arbitrary values from given dotenv or properties sources

Install

$ npm install -g dotenv-props-tool

Usage

 $ dotenv-props-tool command source destination from to [from to ...] [--save]

Commands:

  • e2p - Source is dotenv and destination is properties
  • p2e - Source is properties and destination is dotenv
  • p2p - Source is properties and destination is properties
  • e2e - Source is dotenv and destination is dotenv

Options:

  • --save Save output to destination rather then print to stdout
  • --save file Save output to file

Examples

Reads value of MYSQL_USERNAME from the /path/.env and adds that value as spring.datasource.username to the /path/file.properties and prints result to stdout:

$ dotenv-props-tool e2p /path/.env /path/file.properties MYSQL_USERNAME spring.datasource.username

Reads value of MYSQL_USERNAME from the /path1/.env and adds that value as DB_USER to the /path2/.env and saves the result to stdout:

$ dotenv-props-tool e2e /path1/.env /path2/.env MYSQL_USERNAME DB_USER --save /path3/.env

Merge

Merge commands take series of given files, merges them onto other and prints or saves the result

$ dotenv-props-tool command target ...sources [--save [file]]

Commands:

  • me - Given target and sources files are dotenv files
  • mp - Given target and sources files are properties files

For example, to merge env.dist with .env and save the result back to .env you can:

$ dotenv-props-tool me .env .env.dist --save
1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago