Skip to content

fix(cli): scaffold lints clean on fresh init + project-local new-page#9

Merged
leefanv merged 1 commit into
mainfrom
chore/quick-start-fix
May 11, 2026
Merged

fix(cli): scaffold lints clean on fresh init + project-local new-page#9
leefanv merged 1 commit into
mainfrom
chore/quick-start-fix

Conversation

@leefanv
Copy link
Copy Markdown
Owner

@leefanv leefanv commented May 11, 2026

Summary

Quick-start fixes after the 0.4.0 platform-ization release exposed a few rough edges:

# Problem Fix
1 Scaffold shipped design/welcome.tsx with @pattern: welcome-view — but patterns/ is empty in new projects → fresh npm run lint failed Remove design/welcome.tsx + mock/onboarding.ts. Ship empty design/ and mock/ (just .gitkeep).
2 omit-design lint on empty design/ errored with No files matching the pattern "design/**/*.tsx" were found Detect empty design/ up front, emit ✓ no design/*.tsx files yet — nothing to lint and exit 0.
3 omit-design new-page read from node_modules/@omit-design/preset-mobile/templates/ — that dir doesn't exist (preset-mobile stopped shipping templates in 0.3.x) Rewrite to read <project>/patterns/<id>/template.tmpl.tsx. When patterns/ is empty, suggest /distill-patterns-from-prd or /add-pattern.
4 Scaffold CLAUDE.md.tmpl / README.md.tmpl referenced removed concepts (PATTERNS.md in preset-mobile, patterns.config.json, the 8-starter list) Rewritten around the new workflow.
5 Default app/App.tsx redirect hard-coded /designs/main/welcome (which no longer exists) Falls back to /workspace when design/ is empty.
6 Root README.md + README.zh-CN.md Quick start said "Your single starter design lives at design/welcome.tsx" and Five-minute tour ran new-page list-view design/orders/list Rewritten around PRD → distill → new-design flow.
7 packages/cli/README.md listed 6 skills (missing distill-patterns-from-prd + bootstrap-from-figma) and pointed at wrong scaffold path Synced.

Bumps cli 0.4.0 → 0.4.1. No other packages need a bump (no surface change to engine / dev-server / preset).

Test plan

  • bun run build — all packages green
  • Fresh omit-design init demo
    • design/, mock/, patterns/ each contain only .gitkeep
    • bun install && bun run lint✓ no design/*.tsx files yet — nothing to lint (exit 0)
  • omit-design new-page list-view design/orders/list on empty patterns/ → helpful error pointing at distill/add-pattern, exit 1

Publish plan

After merge, on main:

cd packages/cli && npm publish --access public

Only cli needs a republish — preset-mobile / engine / dev-server / eslint-plugin unchanged this cycle.

🤖 Generated with Claude Code

Quick-start fixes after the 0.4.0 platform-ization release:

- Scaffold no longer ships design/welcome.tsx (referenced the removed
  welcome-view pattern → fresh `npm run lint` failed). design/ and mock/
  ship empty (.gitkeep only)
- omit-design lint exits 0 with a friendly note when design/ has no .tsx
  files (was a noisy ESLint "no files matching" error)
- omit-design new-page rewritten to copy from <project>/patterns/<id>/
  template.tmpl.tsx instead of the removed preset-mobile/templates/ path.
  Helpful "no patterns yet — run /distill-patterns-from-prd or
  /add-pattern" hint when patterns/ is empty
- Scaffold CLAUDE.md / README purged of stale references (PATTERNS.md in
  preset-mobile, patterns.config.json, the 8 starter list). app/App.tsx
  redirect falls back to /workspace when design/ has no entries
- README.md / README.zh-CN.md Quick start + Five-minute tour rewritten
  around the PRD → distill → new-design flow

Bumps cli 0.4.0 → 0.4.1 (patch; no API surface changes — fixes only).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@leefanv leefanv merged commit 6a1d1fa into main May 11, 2026
1 check passed
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.

1 participant