Concrete
ReferenceCLI

concrete build

The `concrete build` command — its flags, exit codes and constraints.

Write the template's built files, building only what changed.

Synopsis

concrete build [--out <dir>] [--no-auto-update]

Flags

FlagTypeDefaultWhat it does
--out <dir>string.concrete/buildDirectory to write the built files into, relative to the workspace root
--no-auto-updatebooleanfalseSkip the package refresh this command runs first when the workspace is behind the published release

Exit codes

CodeWhen
0the built files were written
1a step could not build — a module that does not load, a section that does not bundle, a stylesheet that does not compile — or the files cannot be written

Constraints

  • Builds and grades nothing: check grades what it writes, and publish builds, checks and publishes. It writes no artifact.
  • Writes the template's manifest, each section's schema, fill spec, logic, renderer and island chunks, the template's composition and stylesheet, and the assets and shared bundles they name. Beside the directory, never in it, it writes the build's record, <dir>.json (.concrete/build.json by default): every file's hash, the template's and each section's content hash, and which sections this run built.
  • Incremental: a section is built again only when a file its bundles were made from changed since the last build in the same directory. The workspace, the schemas and the stylesheet are read on every run.
  • Deterministic: the same tree builds to the same content hashes.
  • A failure writes nothing, so the previous build stays whole.
  • The default output directory, .concrete/build/, is gitignored by the scaffold.

Before it runs

This command first checks that the workspace is on the published release of @homepages/concrete and refreshes it when it is behind inside the same major — Staying current has the rules. --no-auto-update skips that for one run.

See also