@qiwi/uniconfig-plugin-dotenv
v3.5.12
Published
Uniconfig dotenv parser plugin
Downloads
86
Readme
@qiwi/uniconfig-plugin-dotenv
Uniconfig dotenv parser plugin
Install
npm i @qiwi/uniconfig-plugin-dotenv
yarn add @qiwi/uniconfig-plugin-dotenv
Usage
Imagine ./some.env
FOO=BAR
BAZ=QUX
import Config, {rollupPlugin} from '@qiwi/uniconfig-core'
import uniconfigPluginDotenv from '@qiwi/uniconfig-plugin-dotenv'
rollupPlugin(uniconfigPluginDotenv)
const config = new Config('./some.env', {mode: SYNC, pipeline: 'file>dotenv'})
config.get('FOO') // 'BAR'