Neanderthal Pudding Mix

    inject-direnv

    0.3.1 • Public • Published

    inject-direnv

    find .envrc(until root directory) inject export variable if you are using JetBrain series, You can run IDE Run(option + F11) with injected .envrc

    Install

    npm install -D inject-direnv

    Usage

    WebStorm (Intellij)

    Run Intellij(WebStorm)
    Ctrl + A

    In code

    import 'inject-direnv'

    Configuration

    Default target direnv file is .envrc, you can change with INJECT_DIRENV_ENVRC variable

    Edit .envrc.local

    export ENVRC_LOCAL=yes

    Export INJECT_DIRENV_ENVRC

    export INJECT_DIRENV_ENVRC=.envrc.local

    Load package

    import 'inject-direnv'
     
    console.log(process.env.ENVRC_LOCAL)
    // yes

    Basic concept

    vim .envrc

    save below text

    export INJECT=true

    Run node with -r inject-direnv option

    node -r inject-direnv
    > process.env.INJECT
    'true'

    License

    MIT

    Keywords

    none

    Install

    npm i inject-direnv

    DownloadsWeekly Downloads

    24

    Version

    0.3.1

    License

    MIT

    Unpacked Size

    2.67 kB

    Total Files

    5

    Last publish

    Collaborators

    • deptno