UNPKG

weapp-tailwindcss

Version:

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

45 lines (44 loc) 2.28 kB
import type { OutputAsset } from 'rollup'; import type { Plugin, ResolvedConfig } from 'vite'; import type { ICreateCacheReturnType } from '../cache/index.js'; import type { AppType, CreateJsHandlerOptions, ICustomAttributesEntities, InternalUserDefinedOptions, JsHandler, LinkedJsModuleResult } from '../types/index.js'; interface UniAppXRuntimeState { readyPromise: Promise<unknown>; } interface CreateUniAppXPluginsOptions { appType: AppType; customAttributesEntities: ICustomAttributesEntities; disabledDefaultTemplateHandler: boolean; mainCssChunkMatcher: NonNullable<InternalUserDefinedOptions['mainCssChunkMatcher']>; runtimeState: UniAppXRuntimeState; styleHandler: InternalUserDefinedOptions['styleHandler']; generateCss?: ((id: string, code: string, hookContext?: { addWatchFile?: (id: string) => void; transient?: boolean; }) => Promise<string | undefined> | string | undefined) | undefined; jsHandler: JsHandler; ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>; getResolvedConfig: () => ResolvedConfig | undefined; isIosPlatform?: boolean; isEnabled?: (() => boolean) | undefined; uniAppX?: InternalUserDefinedOptions['uniAppX']; } export declare function createUniAppXPlugins(options: CreateUniAppXPluginsOptions): Plugin[]; type ApplyLinkedResults = (linked: Record<string, LinkedJsModuleResult> | undefined) => void; interface CreateUniAppXAssetTaskOptions { cache: ICreateCacheReturnType; hashKey?: string; hashSalt?: string; createHandlerOptions: (absoluteFilename: string, extra?: CreateJsHandlerOptions) => CreateJsHandlerOptions; debug: (format: string, ...args: unknown[]) => void; jsHandler: JsHandler; onUpdate: (filename: string, oldVal: string, newVal: string) => void; runtimeSet: Set<string>; applyLinkedResults: ApplyLinkedResults; uniAppX?: InternalUserDefinedOptions['uniAppX']; getAssetSource?: (file: string) => string | undefined; getCssSources?: () => Iterable<string | undefined>; injectStylePlaceholder?: boolean; } export declare function createUniAppXAssetTask(file: string, originalSource: OutputAsset, outDir: string, options: CreateUniAppXAssetTaskOptions): () => Promise<void>; export {};