shadcn-vue/packages/module
Gary Thomas 9d66d15801
fix: allow .ts or .js extension in module package (#225)
* fix: allow .ts or .js extension in module package

* Update module.ts to replace node:path with pathe package
2023-12-30 00:22:32 +03:30
..
playground chore: bump deps version 2023-12-01 11:55:46 +08:00
src fix: allow .ts or .js extension in module package (#225) 2023-12-30 00:22:32 +03:30
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: release v0.8.5 2023-12-21 09:07:47 +08:00
README.md feat: Nuxt module (#197) 2023-12-01 11:31:27 +08:00
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