Building
Use chant build to synthesize your TypeScript resource definitions into deployment-ready output.
chant build # Build from current directorychant build ./infra # Build from a specific pathchant build -o stack.json # Output to filechant build --format yaml # YAML outputchant build --watch # Re-run on file changesSee the build CLI reference for full flag documentation.
What Happens
Section titled “What Happens”The build command:
- Discovers all
.tsfiles in the specified path - Imports modules and collects declarable entities
- Resolves attribute references and dependencies
- Builds dependency graph and performs topological sort
- Serializes to the lexicon-specific format
- Outputs result to stdout or file
Multi-file output
Section titled “Multi-file output”When your project uses child projects (e.g. nested stacks), the build may produce multiple output files. For example, the AWS lexicon’s nestedStack() generates a parent template plus one child template per child project:
chant build -o template.json# Produces:# template.json — parent template# network.template.json — child template (one per nestedStack)All generated files are written alongside the primary output file. See Multi-Stack Output for details.
Deployment
Section titled “Deployment”chant does not include a deployment engine. Use your target platform’s tools to deploy the generated output. See your lexicon’s documentation for provider-specific deployment examples.