feat(shadcn): #48 init scaffold alongside daisyUI#55
Closed
fray-cloud wants to merge 1 commit into
Closed
Conversation
Handcrafted shadcn init to preserve the front/* alias and Nx layout. Scaffolding only — no call-site swaps; daisyUI plugin remains active. - apps/web/components.json — shadcn schema 1, style default, rsc true, baseColor neutral, cssVariables, aliases mapped onto front/* (components → front/new-component, ui → front/new-component/ui, utils → front/lib/utils, lib → front/lib, hooks → front/hooks), iconLibrary lucide - apps/web/src/lib/utils.ts — cn helper (clsx + tailwind-merge) - apps/web/src/new-component/ui/ directory created (empty; #49 fills) - apps/web/tailwind.config.js — darkMode ['class'], theme.extend.colors wired to hsl(var(--*)) shadcn tokens, theme.extend.borderRadius, plugins keep `require('daisyui')` and add `tailwindcss-animate` - apps/web/app/globals.css — :root + .dark CSS variables under @layer base - package.json — class-variance-authority, clsx, tailwind-merge, tailwindcss-animate, lucide-react added - nx affected -t lint test build --exclude web-e2e green (4 projects, 10 tasks) - daisyUI classes still render identically (coexistence by design through #54) Refs #48
Reviewer's GuideHand-crafted shadcn/ui scaffolding is introduced alongside the existing daisyUI setup, wiring shadcn-style tokens into Tailwind (colors, radii, dark mode), adding a shared cn() utility and dependencies, and configuring component paths to respect the existing Nx front/* alias layout without changing any call sites yet. Class diagram for the new cn utility module (class)classDiagram
class LibUtils {
+cn(inputs ClassValue[]) string
}
class Clsx {
+clsx(values ClassValue[]) string
}
class TailwindMerge {
+twMerge(classNames string) string
}
LibUtils ..> Clsx : uses
LibUtils ..> TailwindMerge : uses
Flow diagram for shadcn components path aliases in components.json (flow)flowchart TD
ComponentsJSON[components.json shadcn config] --> StyleDefault[style default]
ComponentsJSON --> RscTrue[rsc true]
ComponentsJSON --> BaseColorNeutral[baseColor neutral]
ComponentsJSON --> IconLibraryLucide[iconLibrary lucide]
ComponentsJSON --> AliasComponents[alias components]
ComponentsJSON --> AliasUi[alias ui]
ComponentsJSON --> AliasUtils[alias utils]
ComponentsJSON --> AliasLib[alias lib]
ComponentsJSON --> AliasHooks[alias hooks]
AliasComponents --> FrontNewComponent[front_new_component]
AliasUi --> FrontNewComponentUi[front_new_component_ui]
AliasUtils --> FrontLibUtils[front_lib_utils]
AliasLib --> FrontLib[front_lib]
AliasHooks --> FrontHooks[front_hooks]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit c806363
☁️ Nx Cloud last updated this comment at |
1 task
Owner
Author
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.
Summary
Handcrafted shadcn init (rather than running the interactive CLI) to preserve the
front/*alias and the Nx workspace layout. Scaffolding only — no call-site swaps. daisyUI plugin remains active (removed in #54).apps/web/components.json— styledefault, rsc true, baseColor neutral, cssVariables. Aliases mapped ontofront/*:components → front/new-component,ui → front/new-component/ui,utils → front/lib/utils,lib → front/lib,hooks → front/hooks.iconLibrary: lucide.apps/web/src/lib/utils.ts—cnhelper (clsx + tailwind-merge)apps/web/src/new-component/ui/directory created (empty; [area:shadcn] add button, card, skeleton, avatar, progress components #49 fills it)apps/web/tailwind.config.js—darkMode: ['class'],theme.extend.colorswired tohsl(var(--*))shadcn tokens,theme.extend.borderRadius, plugins list keepsrequire('daisyui')and addstailwindcss-animateapps/web/app/globals.css—:root+.darkCSS variables under@layer basepackage.json— addsclass-variance-authority,clsx,tailwind-merge,tailwindcss-animate,lucide-reactCloses #48.
Test plan
npx nx affected -t lint test build --exclude web-e2egreen (4 projects, 10 tasks)🤖 Generated with Claude Code
Summary by Sourcery
Introduce shadcn-style theming and utilities alongside existing Tailwind/daisyUI setup for the web app.
New Features:
cnutility for composing and merging Tailwind class names.components.jsonfor the web app.Enhancements:
tailwindcss-animate.Build:
class-variance-authority,clsx,tailwind-merge,tailwindcss-animate,lucide-react) to the project dependencies.