Skip to content

feat: add build-local script, bump @tinacms/cli to 2.3.1#48

Merged
kulesy merged 1 commit into
mainfrom
add-build-local-script
May 25, 2026
Merged

feat: add build-local script, bump @tinacms/cli to 2.3.1#48
kulesy merged 1 commit into
mainfrom
add-build-local-script

Conversation

@kulesy

@kulesy kulesy commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a build-local script and bumps the Tina deps so it works:

  "build": "tinacms build && remix vite:build",
+ "build-local": "tinacms build --content=local --skip-cloud-checks -c \"remix vite:build\"",

- "@tinacms/cli": "^2.2.1",
+ "@tinacms/cli": "^2.3.1",

- "tinacms": "^3.7.1"
+ "tinacms": "^3.8.1"

Why

The other Tina starters ship a build-local script that lets contributors and CI build the project without provisioning a real TinaCloud project. This one doesn't — so reproducing a build locally requires either a Tina Cloud account or hand-rolling the right CLI invocation.

The --content=local flag (added in @tinacms/cli@2.3.0 via tinacms/tinacms#6636) is the right tool: it indexes content from the filesystem during the build so no GraphQL network calls happen, but generates a production-shaped client that points at TinaCloud at runtime — so the build artifact is deployable as-is.

This makes the template:

  • Fork-PR-safe in CI smoke tests — works with dummy TINA_CLIENT_ID / TINA_TOKEN env vars
  • Faster to build locally for users who have content checked in
  • Verifiable end-to-end without provisioning a cloud project

Verification

TINA_CLIENT_ID=fake-id-for-smoke \
TINA_TOKEN=fake-token-for-smoke \
TINA_BRANCH=main \
pnpm run build-local

Result: remix vite:build completes clean (91 modules transformed, 9 SSR modules), zero Tina Cloud network calls.

Test plan

  • CI: pnpm install resolves to @tinacms/cli@2.3.1 and tinacms@3.8.1
  • pnpm run build still works with real Tina Cloud creds (unchanged script)
  • pnpm run build-local works with dummy/no creds
  • pnpm run dev still works (unchanged script)

🤖 Generated with Claude Code

Adds a build-local script that produces a deployable build without
needing real Tina Cloud credentials:

  "build-local": "tinacms build --content=local --skip-cloud-checks -c \"remix vite:build\""

--content=local (introduced in @tinacms/cli@2.3.0 via tinacms/tinacms#6636)
indexes content from the filesystem during the build while generating a
production-shaped client that points at TinaCloud at runtime — so the
artifact is deployable as-is. Useful for:

  - CI smoke tests on fork PRs (no secrets needed)
  - Faster local production builds
  - Verifying the build pipeline without provisioning a cloud project

Bumps @tinacms/cli from ^2.2.1 to ^2.3.1 and tinacms from ^3.7.1 to
^3.8.1 to pick up the flag.

Verified locally with dummy TINA_CLIENT_ID / TINA_TOKEN / TINA_BRANCH
env vars: remix vite:build completes clean, zero Tina Cloud network calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@18-th 18-th left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants