Local File
This provider allows you to access variable defined in a different json
file.
Configuration
Field | Value |
---|---|
Path | The Path to the json file |
Sample
.confixrc
{
"project": {
"variableProviders": [
{
"name": "local",
"type": "local",
"path": "./variables.json"
}
]
}
}
File Structure
The file must be a valid json
. Individual properties can be accessed using JsonPaths (opens in a new tab)
Sample
variables.json
{
"faction": "Empire",
"leader": "Emperor Palpatine",
"capital": "Coruscant",
"military.star_destroyers": 15,
"planets": [
{
"name": "Coruscant",
"terrain": "Urban",
"population": 1000000000000
},
{
"name": "Kashyyyk",
"terrain": "Forest",
"population": 45000000
},
{
"name": "Mustafar",
"terrain": "Volcanic",
"population": 2000
}
],
"enemies": ["Rebel Alliance", "Jedi Order"]
}
Variable Path | Value |
---|---|
faction | Empire |
military.star_destroyers | 15 |
planets[0] | { "name": "Coruscant", ...} |
planets[0].name | Coruscant |
enemies | ["Rebel Alliance", "Jedi Order"] |