Skip to content

feat(template-generator): refresh generated README with minimal ASCII tree#27

Merged
PunGrumpy merged 3 commits into
mainfrom
refactor/readme-template-minimal
Jun 5, 2026
Merged

feat(template-generator): refresh generated README with minimal ASCII tree#27
PunGrumpy merged 3 commits into
mainfrom
refactor/readme-template-minimal

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

Replace the prose-heavy scaffold README.md with a minimal, scannable layout: metadata line, conditional ASCII structure tree, scoped external links, and a package-manager-aware dev command.

Problem

New projects generated by verno create shipped a README that repeated post-create instructions (ultracite, shadcn preset changes) in long paragraphs. It was hard to scan and duplicated guidance better suited for docs.

Result

  • Monorepo and single-app scaffolds get a consistent README with an ASCII tree (apps/web, conditional workspace packages, or shallow app layout).
  • Links surface Verno, shadcn (when enabled), and Turborepo (when enabled) without extra noise.
  • devCommand in Handlebars context renders pnpm dev, bun dev, or npm run dev correctly in the Develop section.

Related Issues

N/A

Checklist

  • I've reviewed my code
  • I've written tests
  • I've generated a change set file
  • I've updated the docs, if necessary

Screenshots (if applicable)

N/A — generated markdown only.

Additional Notes

Split into three commits for review:

  1. feat(template-generator): add devCommand to Handlebars context
  2. feat(template-generator): refresh generated README with minimal ASCII tree
  3. chore: add changeset for README template refresh

Changeset: .changeset/fresh-readme-trees.md bumps @vernostudio/template-generator and @vernostudio/cli (patch).

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Generated project README now features an organized structure with sections for project layout, useful links, and development commands.
    • README automatically displays the correct dev command based on the selected package manager (npm, pnpm, or bun).
    • Enhanced README includes conditional sections that adapt to your project configuration (monorepo vs. single-app, design system presence).

PunGrumpy added 3 commits June 5, 2026 22:43
Expose package-manager-aware dev script text for generated README templates.
… tree

Replace prose-heavy scaffold README with structure tree, scoped links,
and package-manager-aware dev command output.
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
verno-studio Ready Ready Preview, Comment Jun 5, 2026 3:45pm

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d95629f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@vernostudio/template-generator Patch
@vernostudio/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74e28483-374d-40ed-be05-07fd82da607d

📥 Commits

Reviewing files that changed from the base of the PR and between fbf94cd and d95629f.

📒 Files selected for processing (7)
  • .changeset/fresh-readme-trees.md
  • packages/template-generator/src/build-template-vars.test.ts
  • packages/template-generator/src/build-template-vars.ts
  • packages/template-generator/src/catalog/tooling.ts
  • packages/template-generator/src/generate.test.ts
  • packages/template-generator/src/templates.generated.ts
  • packages/template-generator/templates/shared/README.md.hbs

📝 Walkthrough

Walkthrough

The PR refactors the generated README template to include package-manager-aware development commands. A new devScriptCommand helper is introduced to format commands correctly for npm, pnpm, and bun. This command is wired into the Handlebars template context and used in the restructured README, which now includes conditional Structure, Links, and Develop sections with dynamic content based on project configuration.

Changes

README generation with package-manager-aware dev command

Layer / File(s) Summary
devScriptCommand helper and unit tests
packages/template-generator/src/catalog/tooling.ts, packages/template-generator/src/build-template-vars.test.ts
New exported helper devScriptCommand(pm) that formats dev commands as npm run dev for npm or ${pm} dev for other package managers, with unit tests validating npm, pnpm, and bun formatting.
Handlebars context integration
packages/template-generator/src/build-template-vars.ts
HandlebarsTemplateContext interface gains readonly devCommand: string field, and buildHandlebarsContext() populates it by calling devScriptCommand(config.packageManager).
README template restructuring
packages/template-generator/src/templates.generated.ts, packages/template-generator/templates/shared/README.md.hbs
README template restructured with dynamic branding header and conditional Structure, Links, and Develop sections driven by Handlebars flags; prior narrative scaffolding and preset-switching guidance removed.
Generated README integration tests
packages/template-generator/src/generate.test.ts
New test suite for monorepo and single-app configurations validating generated README contains expected ASCII tree structure, conditional links, and package-manager-aware dev commands.
Release changeset
.changeset/fresh-readme-trees.md
Changeset documenting patch bumps for template-generator and cli with summary of README generation improvements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With dev commands now aware and bright,
Each package manager gets it right—
npm says "run," the rest say "dev,"
Templates dance with Handlebars blessed.
README trees now show the way! 🌲

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: refreshing the generated README template with a minimal ASCII tree structure, which is the primary focus of this PR.
Description check ✅ Passed The description comprehensively covers the problem statement, solution, and results. It follows the template structure with clear sections including Description, Problem, Result, Related Issues, Checklist, and Additional Notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PunGrumpy
PunGrumpy merged commit 6c21a96 into main Jun 5, 2026
6 checks passed
@PunGrumpy
PunGrumpy deleted the refactor/readme-template-minimal branch June 5, 2026 16:31
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