Skip to main content

dataspine compile

Compile .spine sources into a build artifact JSON file.

Usage

dataspine compile [OPTIONS] --root-namespace <ROOT_NAMESPACE> --out <OUT>

Options

  • --in-file <IN_FILE>: Compile a single .spine file.
  • --source-dir <SOURCE_DIR>: Compile all .spine files recursively under a directory.
  • --root-namespace <ROOT_NAMESPACE>: Required root namespace used when compiling/checking.
  • --lib <LIB>: Additional library paths (runtime libraries are included by default). Can be provided multiple times.
  • --out <OUT>: Required output file path for the generated artifact JSON.
  • --json: Output diagnostics in JSON format instead of human-readable format.

Examples

Compile a directory into an artifact:

dataspine compile \
--source-dir ./spine-src \
--root-namespace my.company \
--out ./build/artifact.json

Compile a single file:

dataspine compile \
--in-file ./spine-src/my/company/orders.spine \
--root-namespace my.company \
--out ./build/artifact.json

Include custom type libraries:

dataspine compile \
--source-dir ./spine-src \
--root-namespace my.company \
--out ./build/artifact.json \
--lib ./type-libraries/custom.json