Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 454 Bytes

file-by-env-value.md

File metadata and controls

23 lines (21 loc) · 454 Bytes

Obtain target config by env variable and resolve its data

const opts = {
  mode: SYNC,
    data: {
      data: {
        data: {
          target: "$env:BAZ"
        },
        template: "<root>/packages/uniconfig-core/test/stub/{{=it.target}}.json"
      },
      sources: {
        env: {
          pipeline: "env"
        }
      },
    },
    pipeline: 'datatree>dot>path>file>json>datatree'
  }

const config = new Config(opts)