Shadcn Nuxt
適用於 Nuxt 的 Shadcn Vue 模組。
功能
- ⛰ 自動導入正確且相關的元件
- 更多功能即將推出...
快速設定
- 將
shadcn-nuxt
依賴項加入您的專案
# Using pnpm
pnpm add -D shadcn-nuxt
# Using yarn
yarn add --dev shadcn-nuxt
# Using npm
npm install --save-dev shadcn-nuxt
- 將
shadcn-nuxt
加入nuxt.config.ts
的modules
區塊
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'
}
})
就這樣!您現在可以在您的 Nuxt 應用程式中使用 Shadcn Nuxt 了✨
開發
# 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