Conveyor Extensions¶
Conveyor adds the following features to base HOCON:
- Smart string lists.
- Including output from external commands.
- Access to environment variables.
- A temporary scratch object.
Smart string lists¶
Any key that requires a list of strings, files or URLs will have brace expansion applied to it recursively. For example:
1 2 3 4 5 |
|
Additionally it's valid in Conveyor to set a string list property to be just a string - it'll be interpreted as a list containing that single element.
Including the output of external commands¶
You can generate config dynamically by using a hashbang include statement paired with an external program, like this:
1 2 3 4 5 6 7 8 9 10 11 |
|
The command line will be evaluated in the same way on all operating systems including Windows, so if you want this to be portable you may want to ensure there's both a .bat
version of your command as well as an extension-less UNIX version.
Environment variables¶
Environment variables can be accessed by writing ${env.FOO}
.
1 |
|
The $HOME environment variable is available also on Windows even though it's not normally set, which can be convenient for pointing to files you don't want to store with your project. This happens because Conveyor is packaged with itself and therefore benefits from the custom launcher.
Temporary object¶
The top level temp
object is deleted before config is printed out by the json
command. It's useful to put keys here that have no real meaning and are only intended for concatenation with other keys.