react-code-dataset / admin-bro /src /utils /theme-bundler.ts
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
import { createRequire } from 'node:module'
import path from 'path'
const require = createRequire(import.meta.url)
const getAdminjsThemesDir = () => path.parse(require.resolve('@adminjs/themes')).dir
export const bundlePath = (theme: string): string => path.join(getAdminjsThemesDir(), `themes/${theme}/theme.bundle.js`)
export const stylePath = (theme: string): string => path.join(getAdminjsThemesDir(), `themes/${theme}/style.css`)