Skip to content

Fix Tailwind removal README uninstall command#474

Open
vladmashk wants to merge 1 commit into
TanStack:mainfrom
vladmashk:package-manager-uninstall-script
Open

Fix Tailwind removal README uninstall command#474
vladmashk wants to merge 1 commit into
TanStack:mainfrom
vladmashk:package-manager-uninstall-script

Conversation

@vladmashk

@vladmashk vladmashk commented Jun 14, 2026

Copy link
Copy Markdown

Fixes the generated React and Solid template READMEs so the “removing Tailwind” instructions use package-manager specific uninstall commands instead of install commands.

Changes:

  • Added getPackageManagerUninstallCommand
  • Added the EJS helper getPackageManagerRemoveScript
  • Updated React and Solid base README templates to use the remove helper
  • Added tests for uninstall command formatting and template helper rendering

For example with npm:

Previously:

### Removing Tailwind CSS

If you prefer not to use Tailwind CSS:

1. Remove the demo pages in `src/routes/demo/`
2. Replace the Tailwind import in `src/styles.css` with your own styles
3. Remove `tailwindcss()` from the plugins array in `vite.config.ts`
4. Uninstall the packages: `npm install @tailwindcss/vite tailwindcss -D`
                                ^^^^^^^

With this change:

### Removing Tailwind CSS

If you prefer not to use Tailwind CSS:

1. Remove the demo pages in `src/routes/demo/`
2. Replace the Tailwind import in `src/styles.css` with your own styles
3. Remove `tailwindcss()` from the plugins array in `vite.config.ts`
4. Uninstall the packages: `npm uninstall @tailwindcss/vite tailwindcss')`
                                ^^^^^^^^^

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Corrected Tailwind CSS removal instructions in generated React and Solid project README templates to use proper package manager-specific uninstall commands.
  • Tests

    • Added test coverage for package manager uninstall functionality and template file generation.

and use it for the 'removing tailwind' section in the template README
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new getPackageManagerUninstallCommand function is exported from package-manager.ts, mapping each package manager to its correct remove/uninstall command. This is wired into template-file.ts as getPackageManagerRemoveScript and exposed to EJS templates. The React and Solid README templates are updated to call this new helper for Tailwind CSS removal instructions. Tests cover all package managers and the template helper.

Changes

Package Manager Remove Script

Layer / File(s) Summary
Uninstall command helper, template wiring, and tests
packages/create/src/package-manager.ts, packages/create/src/template-file.ts, packages/create/tests/package-manager.test.ts, packages/create/tests/template-file.test.ts
getPackageManagerUninstallCommand is added with a switch over package manager types (remove for yarn/pnpm/bun, uninstall for npm/deno). template-file.ts imports it, wraps it as getPackageManagerRemoveScript, and registers it in templateValues. New tests assert correct command output for all five package managers and the template helper.
React and Solid README template updates
packages/create/src/frameworks/react/project/base/README.md.ejs, packages/create/src/frameworks/solid/project/base/README.md.ejs
The Tailwind CSS removal instructions are updated from the add-script boolean variant to call getPackageManagerRemoveScript('@tailwindcss/vite tailwindcss').

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hop hop, the old flag is gone,
No more true to remove at dawn,
removeScript leads the way so neat,
Uninstalling Tailwind, what a feat!
The bunny cheers for cleaner code — 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely describes the main fix: replacing incorrect install commands with proper uninstall commands in Tailwind removal README instructions.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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