react-native-keys
react-native-keys copied to clipboard
[Proposal] JSON integrate
When we use react-native-keys, we need to add multiple JSON files for multiple build variants. and this approach is similar to using Dotenv. with JSON, however, we can handle multiple builds in a single file.
It also has the advantage of having a single set of common keys, which prevents the human error of managing multiple JSONs.
So I propose some schemas.
Sample1
- react-native-keys.json
{
"__common__": { // reserved key (optional)
"secure": {
"KEY1": "hi",
"KEY2": "hi",
},
"public": {
"KEY1": "hi",
"KEY2": "hi",
},
},
"development": {
"secure": {
"KEY1" : "bye" // overwrite
"KEY3" : "new key"
},
"public": {
...
},
},
"production": { // key could be customizable
"secure": {
...
},
"public": {
...
},
},
}
Sample2
- react-native-keys.json
{
"secure": {
"__common__": { // reserved key (optional)
"KEY1": "hi",
"KEY2": "hi",
},
"development": { // key could be customizable
"KEY1": "bye", // overwrite
"KEY3": "new key",
},
"production": { // key could be customizable
"KEY3": "new key",
"KEY4": "new key",
}
},
"public": {
"__common": {
...
},
"development": {
...
},
"production": {
...
}
}
}
I'd be grateful if you could consider it.
@YangJonghun if some developer demand this then i will add this support, let see if demand increase or not,
i added support for multiple JSON so developer can easily understand and migrate from react-native-config
to react-native-keys
easily
I think multiple JSON file will good to scale. with one json file and many member, conflict will happen easily
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.