-
Notifications
You must be signed in to change notification settings - Fork 14
feat(cli): Add new tailwind4 ui setup command #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cedarjs canceled.
|
Greptile OverviewGreptile SummaryAdds a new CLI command Key Changes:
Notes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant tailwind4.js
participant helpers.js
participant tailwind4Handler.js
participant FileSystem
participant Yarn
participant VSCode
User->>CLI: cedar setup ui tailwind4
CLI->>tailwind4.js: Parse command & options
tailwind4.js->>helpers.js: createHandler('tailwind4')
helpers.js->>tailwind4Handler.js: Import handler dynamically
tailwind4Handler.js->>tailwind4Handler.js: Record telemetry
alt install = true
tailwind4Handler.js->>Yarn: Install tailwindcss@^4.1.17, @tailwindcss/vite@^4.1.17
Yarn-->>tailwind4Handler.js: Packages installed
end
tailwind4Handler.js->>FileSystem: Check for vite.config.ts
alt vite.config.ts exists && vite.config.mts doesn't exist
tailwind4Handler.js->>FileSystem: Rename .ts to .mts
end
tailwind4Handler.js->>FileSystem: Read Vite config
tailwind4Handler.js->>tailwind4Handler.js: Add tailwindcss import
tailwind4Handler.js->>tailwind4Handler.js: Add tailwindcss() to plugins
tailwind4Handler.js->>FileSystem: Write updated Vite config
tailwind4Handler.js->>FileSystem: Read index.css
alt Directives don't exist
tailwind4Handler.js->>FileSystem: Prepend Tailwind directives to index.css
end
alt scaffold.css exists
tailwind4Handler.js->>User: Prompt to override scaffold.css
User-->>tailwind4Handler.js: Confirm/Deny
alt User confirms
tailwind4Handler.js->>FileSystem: Read tailwind template
tailwind4Handler.js->>FileSystem: Write scaffold.css
end
end
alt Using VS Code
tailwind4Handler.js->>FileSystem: Update .vscode/extensions.json
tailwind4Handler.js->>FileSystem: Update .vscode/settings.json
tailwind4Handler.js->>VSCode: Check installed extensions
VSCode-->>tailwind4Handler.js: Extension list
tailwind4Handler.js->>User: Recommend missing extensions
end
tailwind4Handler.js-->>User: Setup complete
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
packages/cli/src/commands/setup/ui/libraries/tailwind4Handler.js, line 355-361 (link)style: Running this command multiple times will add duplicate extensions
3 files reviewed, 1 comment
Adds a new
tailwind4ui setup command for adding the newest tailwind v4 library and updates to vite config.