mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore: remove dirs import
This commit is contained in:
11
src/dirs.ts
11
src/dirs.ts
@@ -1,11 +0,0 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { resolve } from 'pathe'
|
||||
|
||||
export const distDir = resolve(typeof __dirname === 'undefined' ? fileURLToPath(import.meta.url) : __dirname)
|
||||
|
||||
const _makeResolve = (base: string) => {
|
||||
return (...p: string[]) => resolve(base, ...p)
|
||||
}
|
||||
|
||||
export const runtimeDir = resolve(distDir, 'runtime')
|
||||
export const resolveRuntimeDir = _makeResolve(runtimeDir)
|
||||
@@ -2,7 +2,6 @@ import { resolve, join } from 'pathe'
|
||||
import { defineNuxtModule, installModule, addPlugin, resolveModule } from '@nuxt/kit'
|
||||
import { colors } from '@unocss/preset-uno'
|
||||
import type { UnocssNuxtOptions } from '@unocss/nuxt'
|
||||
import { runtimeDir } from './dirs'
|
||||
|
||||
export default defineNuxtModule({
|
||||
name: '@nuxthq/ui',
|
||||
@@ -96,10 +95,11 @@ export default defineNuxtModule({
|
||||
|
||||
await installModule(nuxt, { src: '@unocss/nuxt', options })
|
||||
|
||||
addPlugin(resolveModule('./plugin', { paths: runtimeDir }), { append: true })
|
||||
|
||||
const runtimeDir = resolve(__dirname, 'runtime')
|
||||
const componentsDir = resolve(__dirname, 'components')
|
||||
|
||||
addPlugin(resolveModule('./plugin', { paths: runtimeDir }), { append: true })
|
||||
|
||||
nuxt.hook('components:dirs', (dirs) => {
|
||||
dirs.push({
|
||||
path: join(componentsDir, 'elements'),
|
||||
|
||||
Reference in New Issue
Block a user