The configuration file supports some, but not all, possible actions using command-line arguments.
The most important option is mode. This MUST BE either compile or decompile.
{
"mode": "decompile"
}To process files, the input and output properties MUST BE defined using either an absolute or relative path.
{
"mode": "compile",
"input": "index.twee",
"output": "index.html"
}If using the "mode": "compile" option, the story-format property MUST BE defined. This should be the name of a directory in the relative ./story-formats directory.
For example, if using Harlowe, the path would be ./story-formats/harlowe and the key-value pair would be "story-format": "harlowe".
{
"mode": "compile",
"input": "index.twee",
"output": "index.html",
"story-format": "harlowe"
}The Story Format Archive retrieves story formats based on its version in a sub-directory structure:
story-formats/
├── harlowe/
│ ├── 2.3.0/
│ └── format.js
│ ├── 2.4.0/
│ └── format.js
This can be specified, such as 3.2.0, or the default latest, can be used.
{
"mode": "compile",
"input": "index.twee",
"output": "index.html",
"story-format": "harlowe",
"story-format-version": "3.2.0"
}If only the story format name is specified, and it can be found in the local story-formats directory, it will search for a corresponding format.js file.