mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 08:50:34 +01:00
chore: fix preset resolve
This commit is contained in:
11
src/dirs.ts
Normal file
11
src/dirs.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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 presetsDir = resolve(distDir, 'presets')
|
||||
export const resolvePresetsDir = _makeResolve(presetsDir)
|
||||
Reference in New Issue
Block a user