UNPKG

weapp-tailwindcss

Version:

把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!

28 lines (27 loc) 1.35 kB
import type { Plugin } from 'vite'; import type { CssStage } from '../../compiler/index.js'; import type { AppType } from '../../types/index.js'; interface RewriteCssImportsOptions { appType?: AppType | undefined; getAppType?: (() => AppType | undefined) | undefined; generateTailwindCss?: ((id: string, code: string, hookContext?: { addWatchFile?: (id: string) => void; emitFile?: (emittedFile: { type: 'asset'; fileName: string; source: string; }) => string; cssStage?: CssStage | undefined; }) => Promise<string | undefined> | string | undefined) | undefined; shouldOwnTailwindGeneration?: boolean | undefined; shouldRewrite: boolean; rootImport?: string | undefined; weappTailwindcssDirPosix: string; onTailwindRootCss?: ((id: string, code: string) => Promise<void> | void) | undefined; onCssSourceTransform?: ((id: string, code: string) => Promise<void> | void) | undefined; shouldGenerateCss?: ((id: string, code: string) => boolean) | undefined; shouldDeferGeneration?: ((id: string, code: string) => boolean) | undefined; } export declare function createRewriteCssImportsPlugins(options: RewriteCssImportsOptions): Plugin[]; export declare function hasVitePipelineTailwindGenerationDirective(code: string): boolean; export {};