mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore: update module
This commit is contained in:
@@ -2,7 +2,7 @@ export default {
|
||||
entries: [
|
||||
'./src/index',
|
||||
{ input: './src/components/', outDir: 'dist/components', ext: 'js' },
|
||||
{ input: './src/runtime/', outDir: 'dist/runtime', ext: 'js' },
|
||||
{ input: './src/plugins/', outDir: 'dist/plugins', ext: 'js' },
|
||||
{ input: './src/utils/', outDir: 'dist/utils', ext: 'js' }
|
||||
],
|
||||
declaration: true,
|
||||
|
||||
19
src/index.ts
19
src/index.ts
@@ -1,11 +1,8 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { dirname, resolve } from 'pathe'
|
||||
import { resolve } from 'pathe'
|
||||
import { defineNuxtModule, installModule, addPlugin, addComponentsDir } from '@nuxt/kit'
|
||||
import { colors } from '@unocss/preset-uno'
|
||||
import type { UnocssNuxtOptions } from '@unocss/nuxt'
|
||||
|
||||
const dir = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
export interface UiColorsOptions {
|
||||
/**
|
||||
* @default 'indigo'
|
||||
@@ -135,35 +132,35 @@ export default defineNuxtModule<UiOptions>({
|
||||
await installModule(nuxt, { src: '@vueuse/core/nuxt' })
|
||||
await installModule(nuxt, { src: '@unocss/nuxt', options })
|
||||
|
||||
addPlugin(resolve(dir, './runtime/plugin'))
|
||||
addPlugin(resolve(__dirname, './plugins/plugin'))
|
||||
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/elements'),
|
||||
path: resolve(__dirname, './components/elements'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/feedback'),
|
||||
path: resolve(__dirname, './components/feedback'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/forms'),
|
||||
path: resolve(__dirname, './components/forms'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/layout'),
|
||||
path: resolve(__dirname, './components/layout'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/navigation'),
|
||||
path: resolve(__dirname, './components/navigation'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
addComponentsDir({
|
||||
path: resolve(dir, './components/overlays'),
|
||||
path: resolve(__dirname, './components/overlays'),
|
||||
prefix,
|
||||
watch: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user