[AC-3293] Alloy: Project Configuration File should be deep-merged
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2014-12-18T15:52:50.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | alloy, config.json |
Reporter | Fokke Zandbergen |
Assignee | Radamantis Torres-Lechuga |
Created | 2014-12-18T10:01:10.000+0000 |
Updated | 2016-03-08T07:57:42.000+0000 |
Description
Currently, the merge between different targets (by environment, deploy-type etc) within the same
config.json
as well as the merge of the app-level config.json
and the one of the selected theme is shallow.
I'd like the merge to be deep.
Use case
*app/config.json*
{
"global": {
"colors": {
"dark": "red"
"light": "white"
}
},
"os:ios": {
"colors": {
"dark": "blue"
}
}
}
*app/themes/mine/config.json*
{
"os:ios": {
"colors": {
"dark": "green"
}
}
}
Current result
*Resources/iphone/alloy/CFG.js*
module.exports = {
"colors": {
"dark": "green"
}
};
Desired result
*Resources/iphone/alloy/CFG.js*
module.exports = {
"colors": {
"light": "white",
"dark": "green"
}
};
Duplicates ALOY-1199
Had to read ALOY-1199 3 times before I saw it, but indeed... Duplicate, but very much wanted.