dynamic-config-store
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -151,3 +151,2 @@ import immer from 'immer'; | ||
this.setEnvOverridePrefix(envOverridePrefix); | ||
console.log("Should have set values", config); | ||
}; | ||
@@ -154,0 +153,0 @@ ConfigStore.prototype.getConfig = function (_a) { |
@@ -153,3 +153,2 @@ "use strict"; | ||
this.setEnvOverridePrefix(envOverridePrefix); | ||
console.log("Should have set values", config); | ||
}; | ||
@@ -156,0 +155,0 @@ ConfigStore.prototype.getConfig = function (_a) { |
@@ -155,3 +155,2 @@ (function (global, factory) { | ||
this.setEnvOverridePrefix(envOverridePrefix); | ||
console.log("Should have set values", config); | ||
}; | ||
@@ -158,0 +157,0 @@ ConfigStore.prototype.getConfig = function (_a) { |
{ | ||
"name": "dynamic-config-store", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Simple configuration utility for deployments and libraries", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -37,7 +37,14 @@ ## 🔱 Dynamic Config Store | ||
A configuration can be easily dynamically changed via the following means: | ||
Getting config values at a later stage is easy: | ||
``` | ||
const { isProductionEnv } = config.getConfig(); | ||
``` | ||
As far as usefulness goes, this isn't giving us much at the moment. Let's look at some ways `dynamic-config-store` expands on the | ||
customization of your configs: | ||
### 🔌 Environment Links | ||
#### Nice, pre-defined environment overrides for your config | ||
#### Pre-defined environment overrides for your config | ||
@@ -87,3 +94,3 @@ Let's try one now: | ||
Here we define two more environment links. You can define as many and deeply in the config | ||
Here we define two more environment links. You can define as many and as deeply in the config | ||
"tree" as you would like. For the sake of example we have run `setEnvLinks()` twice now, but | ||
@@ -93,3 +100,4 @@ you can combine all your links in one go. | ||
You can see on the second link here, we set a `defaultValue` - this will take precedence over | ||
the initial default value we set at the beginning, on defining the config. | ||
the initial default value we set at the beginning, on defining the config. (This is mostly useful | ||
when overriding external library configs) | ||
@@ -137,3 +145,3 @@ Lastly, look at the `type` that has been set for both. `NUMBER` and `STRING` respectively. Let's go | ||
Those two second parameters here identify this configuration much better. And especially for the sake of | ||
Those two second parameters identify this configuration much better. And especially for the sake of | ||
Environment Overrides, the first one helps us target this specific config - like so: | ||
@@ -173,3 +181,3 @@ | ||
#### Ignoring Environment Overrides | ||
### Ignoring Environment Overrides | ||
@@ -183,2 +191,4 @@ If for whatever reason (possibly security concerns) you don't want to allow an override for a certain value - all | ||
## Config Reactions | ||
### Deep Merging and Extending | ||
@@ -185,0 +195,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
279
79569
646