tcb app build
Builds the locally-built items defined in the declarative config (cloudbaserc.json) — both hosting[] and app — to generate deployment output. Build only — no deployment, no dependency installation.
Usage
tcb app build [options]
The command has no command-specific parameters; see Global Options for the common ones. It calls no cloud API and requires no login.
Used together with tcb deploy
tcb app build # build app and hosting[] output locally
tcb deploy # upload the output and orchestrate remaining resources
Behavior
- Reads
appandhosting[]incloudbaserc.jsonand resolves a build command per item (priority: explicitbuildCommand>frameworkpreset > auto-detect frompackage.jsondependencies) - Build order:
appfirst, thenhosting[]in declaration order - Runs the build command in each item's
rootdirectory - Does not run
installCommand— install dependencies yourself beforehand (e.g.npm install); errors ifpackage.jsondeclares dependencies butnode_modulesis missing - Pure-static items (no
buildCommand/framework: static) are skipped - Output is generated in each item's
outputDir; when unset it is inferred from the build config (vite/vue→dist,react(CRA) →build,next→.next,angular→outputPathinangular.json) - When
app.rootand ahosting[].rootpoint to the same directory, it is built once:appis built first, the skipped item reuses the command derived fromappwith a warning. If the two build commands differ, the one configured onhosting[]is ignored — configure separaterootvalues to build them differently - Fail-fast: the first failing item aborts the run; remaining items are not built
- When neither
appnorhosting[]is configured, only an informational message is printed (no error)
Command comparison
| Command | Build | Deploy | Dependencies |
|---|---|---|---|
tcb app build | Local build (app + hosting[]) | ❌ | Not installed; install yourself |
tcb deploy | ❌ No build (artifacts uploaded as-is) | ✅ All resources orchestrated | Not handled |
tcb app deploy | Cloud build (app field) | ✅ Single app only | Installed in the cloud |
Related commands
- Deploy app: install dependencies and build in the cloud, then upload
- Declarative deployment: orchestrate multiple resources