Angular
Deploy an Angular site to LeafCloud.
Requirements
Section titled “Requirements”Validated with Node v24.22.1, Angular 22.2.3 (@angular/cli and @angular/build 22.2.4), and npm 11.19.1.
-
Create an Angular project:
Terminal window npx -y @angular/cli@latest new app --defaults --skip-git --ssr=false --style=css --routing=false --interactive=false < /dev/nullTerminal window cd app -
Preview the deployment:
Terminal window leaf deploy --dry-runObserved output:
Framework: AngularPackage manager: npmBuild command: npm run buildOutput directory: dist/app/browserFiles: 4Total size: 139049 bytesDry run: nothing was uploaded.Terminal window leaf deploy --dry-run --json
What LeafCloud detects
Section titled “What LeafCloud detects”Angular; npm run build; dist/app/browser.
Common problems
Section titled “Common problems”If an Angular workspace has several projects but no single application project or valid defaultProject, set dir in leaf.toml to select the build output directory.
For agents
Section titled “For agents”Run leaf deploy --dry-run --json first.
Check the exit code and stop if the JSON contains "error".
After a successful dry run, run leaf deploy --json --yes.
Never print credentials.
Validated on 2026-10-23 with Angular CLI and @angular/build 22.2.4.