Created
February 18, 2019 16:32
-
-
Save hawkeye64/fc33301d7e6fb45d4f662fb05b1d816c to your computer and use it in GitHub Desktop.
dotenv - handling common root object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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