🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

dotenv-touch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-touch

Touch .env file from local environments and options

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

dotenv-touch Build Status

Touch .env file from local environments and options

Install

$ npm install --save dotenv-touch

Usage

const touch = require('dotenv-touch');

touch({
  LANG: 'Us',
  SHELL: 'zsh',
  TEST: 1
}, {
  breakLine: '\n'
})
//=> LANG=Us\nSHELL=zsh\nTEST=1

API

dotenvTouch(input, [output], [options])

input

Type: object

Object which become to field-value

output

Type: 'String'

Path of output file. If it is not given skipping file writing.

options

breakLine

Type: String
Default: \n

Characters for break a like aka CR/LF

CLI

$ npm install --global dotenv-touch
$ dotenv-touch --help

Usage
  $ dotenv-touch [environments] [options]

Options
  --process: true or list of name of environments in process.env to pick up
  --output: path for env file

Examples,
  $ dotenv-touch API_KEY=YOUR_APIKEY PRODUCTION=false SIGNATURE_ID=YOUR_ID,
  $ dotenv-touch API_KEY=YOUR_APIKEY PRODUCTION=false --output=./config,
  $ dotenv-touch --process,
  $ dotenv-touch --process=SHELL,LOGNAME,LANG,
  $ TEST=1 node cli.js API_KEY=key PRODUCTION=\my production\ --process=SHELL,LOGNAME,LANG,TEST,
  >> SHELL: \/bin/zsh\,
  		LOGNAME: \ragingwind\,
  		LANG: \en_US.UTF-8\,
  		TEST: \1\,
  		API_KEY: \key\,
  		PRODUCTION: \my production\

License

MIT © ragingwind

Keywords

dotenv

FAQs

Package last updated on 18 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts