1.0.0 • Published 3 years ago
@vacantthinker/read_env_file v1.0.0
how to use ?
env.sh
BITBUCKET_USERNAME="abcdefg"
BITBUCKET_APP_PASSWORD="abcdefg1234567"usage
let {BITBUCKET_USERNAME, BITBUCKET_APP_PASSWORD}
= require('@vacantthinker/read_env_file').readEnvFile('env.sh');output
{
BITBUCKET_USERNAME: 'abcdefg',
BITBUCKET_APP_PASSWORD: 'abcdefg1234567'
}works
readEnvFile()
/**
* read env file , eg: env.sh xxx.env
*
* @param filename path env file
* @param logObj default: false
* @returns {{}}
*/
function readEnvFile(filename, logObj = false) {}how to install ?
npm install @vacantthinker/read_env_file -D1.0.0
3 years ago