feat(cli): Add new tailwind4 ui setup command#664
Open
dsthedev wants to merge 7 commits intocedarjs:mainfrom
Open
feat(cli): Add new tailwind4 ui setup command#664dsthedev wants to merge 7 commits intocedarjs:mainfrom
dsthedev wants to merge 7 commits intocedarjs:mainfrom
Conversation
✅ Deploy Preview for cedarjs canceled.
|
Contributor
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
|
Contributor
There was a problem hiding this comment.
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
0f0e039 to
aa1c62d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
tailwind4ui setup command for adding the newest tailwind v4 library and updates to vite config.