vanya build
Usage
vanya build [OPTIONS] <FILES>... -o <OUTPUT_DIR>Description
Transpiles vanya files to the target language specified by the plugin. Generates:
- Test files in the target language
- Source maps (
.vanyamap) for debugging
Arguments
| Argument | Description |
|---|---|
<FILES> | One or more .vanya files to build |
Options
| Option | Description |
|---|---|
-o, --output <DIR> | Output directory (required) |
--config <PATH> | Path to config file |
Exit codes
| Code | Meaning |
|---|---|
0 | Build successful |
1 | Build failed (validation or generation error) |
Output structure
out/├── test_login.py # Generated test├── test_login.py.vanyamap # Source map├── test_checkout.py└── test_checkout.py.vanyamapExamples
# Build to out/ directoryvanya build tests/*.vanya -o out/
# Build with custom configvanya build --config ./prod.toml tests/*.vanya -o out/Source maps
Source maps allow tools to map generated code back to the original vanya source. The format is JSON:
{ "source": "login.vanya", "lines": [ null, null, { "start": 100, "end": 150 }, { "start": 100, "end": 150 } ]}Each index in the lines array corresponds to a generated line number (0-indexed). The value is either null (for generated preamble code with no source) or a span object with start and end byte offsets into the original .vanya file.