Skip to content

Angular

Deploy an Angular site to LeafCloud.

Validated with Node v24.22.1, Angular 22.2.3 (@angular/cli and @angular/build 22.2.4), and npm 11.19.1.

  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/null
    Terminal window
    cd app
  2. Preview the deployment:

    Terminal window
    leaf deploy --dry-run

    Observed output:

    Framework: Angular
    Package manager: npm
    Build command: npm run build
    Output directory: dist/app/browser
    Files: 4
    Total size: 139049 bytes
    Dry run: nothing was uploaded.
    Terminal window
    leaf deploy --dry-run --json

Angular; npm run build; dist/app/browser.

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.

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.