Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parse

parse contains utility commands that generate JSON or HTML support files under target/parsed.

npm run cli -- parse <command>

Commands

CommandPurposeOutput
parse dir_as_json <path>Flatten a directory tree into a JSON object keyed by normalized file names.target/parsed/<folder>.json

dir_as_json resolves <path> relative to the repository root.

Options

parse dir_as_json supports:

  • -e, --no-extension: omit file extensions in JSON values.

Examples

npm run cli -- parse dir_as_json src/resources/textures
npm run cli -- parse dir_as_json src/resources/textures --no-extension

Output usage

Use dir_as_json when another script needs a compact index of files under a resource folder. The command writes generated support data under target/parsed, so treat the result as disposable build output.

Use xrf-cli export-externs when checking the script declaration surface exposed by conditions, effects, and dialogs.

Failure notes

dir_as_json requires a path argument.