File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 46
46
47
47
This will safely resolve to an object `{ url : string, timeout: number }` by merging sibling keys.
48
48
49
+ Note that `$env` is aware of environment name aliases as well. See [meta file](./settings.md#parse-and-loading-configuration)
50
+ for how to change the environmentSourceNames or environmentAliases.
51
+
49
52
# # The `$extends` Directive
50
53
51
54
Merges (deeply) values from another file. The current file has precedent when merging.
52
55
53
56
` ` ` yaml
57
+ # Use it with a file path
54
58
$extends: './other-file.yml'
55
59
60
+ # Or use it with options
56
61
nested:
57
62
propertyA:
58
63
$extends:
59
64
path: ./other-file.yml
60
65
optional: true
61
66
select: 'foo.bar'
67
+
68
+ # An array also works
69
+ $extends:
70
+ - ./file1.yml
71
+ - ./file2.yml
62
72
` ` `
63
73
64
- This option can be given a string ( filepath) , an object with options, or an array of objects.
74
+ This option can be given a filepath, an object with options, or an array of objects.
65
75
66
- ` select` allows extending a sub-object and `optional` allows missing files. These are optional .
76
+ ` select` allows extending a property from the other file, and `optional` allows missing files.
67
77
68
78
# # The `$override` Directive
69
79
70
80
The override directive is exactly the same as `$extends`, except that the other file takes precedent when merging.
71
81
This is useful for the pattern :
72
82
73
83
` ` ` yaml
84
+ # if present, the values in this file will override the ones here
74
85
$override:
75
86
path: /etc/my-app/config.yml
76
87
optional: true
88
+
77
89
# ... default values
78
90
` ` `
79
91
You can’t perform that action at this time.
0 commit comments