https://github.com/varletjs/varlet-nuxt
Varlet module for Nuxt
https://github.com/varletjs/varlet-nuxt
nuxt nuxt-module vue
Last synced: 11 months ago
JSON representation
Varlet module for Nuxt
- Host: GitHub
- URL: https://github.com/varletjs/varlet-nuxt
- Owner: varletjs
- License: mit
- Created: 2023-03-20T13:14:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T10:37:23.000Z (about 2 years ago)
- Last Synced: 2024-12-17T04:08:03.505Z (over 1 year ago)
- Topics: nuxt, nuxt-module, vue
- Language: Vue
- Homepage:
- Size: 715 KB
- Stars: 26
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Varlet Nuxt
🌟 Inspired by [vant-nuxt](https://github.com/vant-ui/vant-nuxt) and [element-plus-nuxt](https://github.com/element-plus/element-plus-nuxt)
Welcome to contribute this repo
Varlet Module for Nuxt3
## Feature
- Auto import Varlet component in you Nuxt Project
- Auto import Varlet the directive
- Lazy load component
- Material Design Nuxt Component with Material 3 Version
## Quick Setup
1. Add `@varlet/nuxt` dependency to your project
```bash
npx nuxi@latest module add varlet
```
2. Add `@varlet/nuxt` to the `modules` section of `nuxt.config.ts`
```js
export default defineNuxtConfig({
modules: ['@varlet/nuxt'],
varlet: {
modulePath: '...',
exclude: ['...'],
icon: {}
}
})
```
That's it! You can now use Varlet Module in your Nuxt app ✨
tips: If you running `varlet` on the PC. Please install [`@varlet/touch-emulator`](https://varlet.gitee.io/varlet-ui/#/zh-CN/browserAdaptation)
### Options
| fieldName | require | default | effect |
| ---------- | ------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
| modulePath | false | undefind | customer you workspace path if you want |
| exclude | false | '.nuxt', 'node_modules' | exclude some path that you won't transform |
| icon | false | undefined | [svg icon to iconfont](https://github.com/varletjs/varlet-iconx/tree/main/packages/varlet-unplugin-icon-builder) |
## Contribution
We recommend using pnpm
```bash
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Release new version
pnpm run release
```