Skip to content

Instantly share code, notes, and snippets.

@hawkeye64
Created February 18, 2019 16:32
Show Gist options
  • Save hawkeye64/fc33301d7e6fb45d4f662fb05b1d816c to your computer and use it in GitHub Desktop.
Save hawkeye64/fc33301d7e6fb45d4f662fb05b1d816c to your computer and use it in GitHub Desktop.
dotenv - handling common root object
// for brevity
let target = conf.build.env
// check for common root object
if (api.prompts.common_root_object && api.prompts.common_root_object !== 'none') {
let rootObject = api.prompts.common_root_object
if (!target[rootObject]) {
target[rootObject] = {}
target = target[rootObject]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment