env-builder
Build environment variables with inheritance
Last updated 7 years ago by camshaft .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install env-builder 
SYNC missed versions from official npm registry.

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'
      }
    }
  }
}

Current Tags

  • 0.1.0                                ...           latest (7 years ago)

1 Versions

  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |