UNPKG

weapp-tailwindcss

Version:

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

63 lines (62 loc) 3.15 kB
import type { OutputAsset, OutputChunk } from 'rollup'; import type { ViteFrameworkCssPipelineContext, ViteFrameworkCssPipelineStrategy } from '../shared/framework-strategy.js'; import type { InternalUserDefinedOptions } from '../../../types/index.js'; export declare function resolveCssBundleOutputFile(options: { bundleFiles: string[]; defaultStyleOutputExtension: string; file: string; isWebGeneratorTarget: boolean; opts: InternalUserDefinedOptions; pipelineContext: ViteFrameworkCssPipelineContext; cssPipelineStrategy?: ViteFrameworkCssPipelineStrategy | undefined; shouldPreserveAppCssExtension: boolean; }): string; export declare function shouldSkipRawSourceStyleAsset(outputFile: string, file: string, rawSource: string, assetSourceFile?: string, cssMatcher?: ((file: string) => boolean) | undefined): boolean; export declare function resolveOutputFileFromMatchedCssSource(options: { bundleFiles: string[]; defaultStyleOutputExtension: string; isWebGeneratorTarget: boolean; opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>; rootDir: string; shouldPreserveAppCssExtension: boolean; sourceFile: string | undefined; sourceRoot?: string | undefined; }): string | undefined; export declare function createMatchedCssSourceOutputResolver(options: { assetSourceFile: string; file: string; originalFileNames?: string[] | undefined; resolveOutputFileFromMatchedCssSource: (sourceFile: string | undefined) => string | undefined; }): (sourceFile: string | undefined) => string | undefined; export type ResolveCssAssetOutputPlanOptions = Parameters<typeof resolveCssBundleOutputFile>[0] & { assetSourceFile: string; configuredEntries: Array<{ file: string; }>; normalizeConfiguredSourceFile: (file: string) => string; originalFileNames: string[] | undefined; resolveOutputFileFromMatchedCssSource: (sourceFile: string | undefined) => string | undefined; rootImportShellOutputFile: string; rootImportShellTarget: string | undefined; shouldReuseRootImportShell: () => boolean; }; export interface CssAssetOutputPlan { outputFile: string; resolveMatchedOutputFile: (sourceFile: string | undefined) => string | undefined; resolvedFromConfiguredOriginalCssEntry: boolean; reusedRootImportShellTarget: boolean; } export declare function resolveCssAssetOutputPlan(options: ResolveCssAssetOutputPlanOptions): CssAssetOutputPlan; export declare function hasViteProcessedCssResultForSource(sourceFile: string, getViteProcessedCssAssetResults?: (() => Iterable<[string, unknown]> | undefined) | undefined): boolean; export declare function applyCssResultToBundle(options: { assetSourceFile: string; bundle: Record<string, OutputAsset | OutputChunk>; emitOrReplayCssAsset: (file: string, source: string) => OutputAsset | undefined; file: string; originalSource: OutputAsset; outputFile: string; source: string; viteProcessedCssAsset: boolean; pipelineContext: ViteFrameworkCssPipelineContext; cssPipelineStrategy?: ViteFrameworkCssPipelineStrategy | undefined; }): void;