mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 11:47:55 +01:00
@@ -1,5 +1,4 @@
|
|||||||
import { defineNuxtModule, installModule, addComponentsDir, addImportsDir, createResolver, addPlugin } from '@nuxt/kit'
|
import { defineNuxtModule, installModule, addComponentsDir, addImportsDir, createResolver, addPlugin } from '@nuxt/kit'
|
||||||
import defaultColors from 'tailwindcss/colors.js'
|
|
||||||
import type { CollectionNames, IconsPluginOptions } from '@egoist/tailwindcss-icons'
|
import type { CollectionNames, IconsPluginOptions } from '@egoist/tailwindcss-icons'
|
||||||
import { name, version } from '../package.json'
|
import { name, version } from '../package.json'
|
||||||
import createTemplates from './templates'
|
import createTemplates from './templates'
|
||||||
@@ -7,17 +6,6 @@ import * as config from './runtime/ui.config'
|
|||||||
import type { DeepPartial, Strategy } from './runtime/types/utils'
|
import type { DeepPartial, Strategy } from './runtime/types/utils'
|
||||||
import installTailwind from './tailwind'
|
import installTailwind from './tailwind'
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
delete defaultColors.lightBlue
|
|
||||||
// @ts-ignore
|
|
||||||
delete defaultColors.warmGray
|
|
||||||
// @ts-ignore
|
|
||||||
delete defaultColors.trueGray
|
|
||||||
// @ts-ignore
|
|
||||||
delete defaultColors.coolGray
|
|
||||||
// @ts-ignore
|
|
||||||
delete defaultColors.blueGray
|
|
||||||
|
|
||||||
type UI = {
|
type UI = {
|
||||||
primary?: string
|
primary?: string
|
||||||
gray?: string
|
gray?: string
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
|
import { createRequire } from 'node:module'
|
||||||
import { join } from 'pathe'
|
import { join } from 'pathe'
|
||||||
import { addTemplate, installModule, useNuxt } from '@nuxt/kit'
|
import { addTemplate, installModule, useNuxt } from '@nuxt/kit'
|
||||||
import defaultColors from 'tailwindcss/colors.js'
|
|
||||||
import { excludeColors, generateSafelist } from './runtime/utils/colors'
|
import { excludeColors, generateSafelist } from './runtime/utils/colors'
|
||||||
import type { ModuleOptions } from './module'
|
import type { ModuleOptions } from './module'
|
||||||
|
|
||||||
|
const _require = createRequire(import.meta.url)
|
||||||
|
const defaultColors = _require('tailwindcss/colors.js')
|
||||||
|
|
||||||
|
delete defaultColors.lightBlue
|
||||||
|
delete defaultColors.warmGray
|
||||||
|
delete defaultColors.trueGray
|
||||||
|
delete defaultColors.coolGray
|
||||||
|
delete defaultColors.blueGray
|
||||||
|
|
||||||
export default async function installTailwind (moduleOptions: ModuleOptions, nuxt = useNuxt(), { resolve, runtimeDir }) {
|
export default async function installTailwind (moduleOptions: ModuleOptions, nuxt = useNuxt(), { resolve, runtimeDir }) {
|
||||||
// 1. register hook
|
// 1. register hook
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user