env-builder

0.1.0 • Public • Published

env-builder Build Status

Build environment variables with inheritance

Tests

$ npm test

Layout

.
├── default
│   ├── default
│   ├── test
│   └── local
├── types
│   ├── ui
│   │   ├── default
│   │   ├── test
│   │   └── local
│   ├── api
│   │   ├── default
│   │   ├── test
│   │   └── local
│   └── auth
│       ├── default
│       ├── test
│       └── local
└── apps
    ├── my-first-app
    │   ├── default
    │   ├── test
    │   └── local
    ├── my-second-app
    │   ├── default
    │   ├── test
    │   └── local
    └── my-third-app
        ├── default
        ├── test
        └── local
{
  default: {
    default: {
      API_URL: 'http://example.com'
    },
    test: {
      API_URL: 'http://test.example.com'
    },
    local: {
      API_URL: 'http://dev.example.com'
    }
  },
  types: {
    ui: {
      default: {
        NODE_ENV: 'production'
      },
      test: {
        NODE_ENV: 'test'
      },
      local: {
        NODE_ENV: 'development'
      }
    }
  },
  apps: {
    'my-first-app': {
      default: {
        APP_VAR: 'foo'
      },
      test: {
        APP_VAR: 'bar'
      },
      local: {
        APP_VAR: 'baz'
      }
    }
  }
}

Readme

Keywords

Package Sidebar

Install

npm i env-builder

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • camshaft