shadcn-vue/packages/module
zernonia f8f3fc754f
feat: support tailwind prefix (#619)
* chore: enable tw prefix

* chore: enable tw  prefix during init

* fix: cater for cn function

* fix: prevent transforming importDeclaration

* chore: update registry to make sure tailwind prefix parse correctly

* chore: fix wrong import

* chore: checkpoint

* refactor: goodbye ts-morph

* chore: remove ts-morpg

* chore: update test

* chore: cleanup

* chore: fix test

* fix: move vue-metamorph to dep

* refactor: transform tw prefix by specific case

* fix: transform-sfc not parsing .ts file

* fix: prefix double quote

* chore: patch vue-eslint-parser

* refactor: transform to cater only for class in sfc

* refactor: replace detypes with @unovue/detypes

* chore: update test snapshot

* chore: update pnpm-lock, fix import

* chore: bump detypes version

* chore: update deps
2024-10-14 19:39:58 +08:00
..
playground chore(module): add critical packages to module's dependencies (#531) 2024-05-24 17:03:48 +03:30
src feat: support tailwind prefix (#619) 2024-10-14 19:39:58 +08:00
test feat: Nuxt module (#197) 2023-12-01 11:31:27 +08:00
.gitignore feat: Nuxt module (#197) 2023-12-01 11:31:27 +08:00
.npmrc feat: Nuxt module (#197) 2023-12-01 11:31:27 +08:00
package.json chore(nuxt): add nuxt modules package required for development (#750) 2024-09-04 23:33:42 +03:30
README.md chore: lint and enable Volar hybrid mode (#419) 2024-03-20 22:29:42 +03:30
tsconfig.json feat: Nuxt module (#197) 2023-12-01 11:31:27 +08:00

Shadcn Nuxt

npm version npm downloads License Nuxt

Shadcn Vue module for Nuxt.

Features

  • ⛰ Auto-import correct and relevant components
  • more to come...

Quick Setup

  1. Add shadcn-nuxt dependency to your project
# Using pnpm
pnpm add -D shadcn-nuxt

# Using yarn
yarn add --dev shadcn-nuxt

# Using npm
npm install --save-dev shadcn-nuxt
  1. Add shadcn-nuxt to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'shadcn-nuxt'
  ],
  shadcn: {
    /**
     * Prefix for all the imported component
     */
    prefix: '',
    /**
     * Directory that the component lives in.
     * @default "./components/ui"
     */
    componentDir: './components/ui'
  }
})

That's it! You can now use Shadcn Nuxt in your Nuxt app

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release