feat(cli): add Auth.js and shadcn/ui plugins#284
Open
gonzoblasco wants to merge 2 commits into
Open
Conversation
Auth.js plugin: - next-auth@beta (v5) dependency - Generates auth.ts, app/api/auth/[...nextauth]/route.ts, and proxy.ts - AUTH_SECRET environment variable - Validation: requires App Router (--router=app) shadcn/ui plugin: - class-variance-authority, clsx, tailwind-merge, tailwindcss-animate, lucide-react deps - shadcn devDependency for CLI usage - Generates components.json (new-york style, neutral base color) and lib/utils.ts (cn helper) - ui:add script for adding components - Validation: requires Tailwind CSS (--styling=tailwind-css)
|
@gonzoblasco is attempting to deploy a commit to the 9ty Team on Vercel. A member of the Team first needs to authorize it. |
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.
Add Auth.js and shadcn/ui (#268)
Closes #268
Summary
Adds two new plugins: Auth.js (NextAuth v5) for authentication and shadcn/ui for accessible component library support.
Auth.js plugin
next-auth@beta(v5)auth.ts— NextAuth config with empty providers arrayapp/api/auth/[...nextauth]/route.ts— route handler exporting GET/POSTproxy.ts— Next.js 16 middleware (session refresh)AUTH_SECRET--router=app)--auth-jsshadcn/ui plugin
class-variance-authority,clsx,tailwind-merge,tailwindcss-animate,lucide-reactshadcn(for CLI usage)components.json— shadcn config (new-york style, neutral base color, CSS variables enabled)lib/utils.ts—cn()helper using clsx + tailwind-mergeui:add(shadcn add) for adding components--styling=tailwind-css)--shadcnDesign decisions
proxy.tsfile follows the Next.js 16 naming convention (formerlymiddleware.ts).shadcn init(which is interactive), the plugin generatescomponents.jsonandlib/utils.tsdirectly. Users can then runshadcn add <component>to add components as needed.shadcn add.Verification
pnpm run build— cleanpnpm run lint— no errorspnpm run unit— 9/9 tests pass./bin/run --helpshows--auth-jsand--shadcnflags--auth-js --router=pagesthrows error--shadcn --styling=css-modulesthrows errorNotes