weapp-tailwindcss
Version:
把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!
45 lines (44 loc) • 2.37 kB
TypeScript
import type { OutputBundle } from 'rollup';
export declare function isRootMiniProgramStyleOutputFile(file: string): boolean;
export declare function createRelativeCssImportRequest(targetFile: string, importedFile: string): string;
export declare function createCssImportShell(targetFile: string, importedFile: string): string;
export declare function resolveSingleCssImportOutputFile(targetFile: string, css: string): string | undefined;
export declare function createRootMiniProgramOriginStyleOutputFile(file: string): string;
export declare function shouldKeepRootMiniProgramStyleAsImportShell(enabled: boolean | undefined): enabled is true;
export declare function shouldPreserveFrameworkRootMiniProgramImportShell(options: {
css: string;
file: string;
isWebGeneratorTarget: boolean;
matchesCss: boolean;
shouldKeep: () => boolean | undefined;
}): boolean;
export interface ResolveFrameworkRootImportShellPlanOptions {
assetSourceFile: string;
configuredTargetFiles: Iterable<string | undefined>;
file: string;
isMainChunk: boolean;
isWebGeneratorTarget: boolean;
matchesCss: boolean;
processedTargetFiles: Iterable<string | undefined>;
rawSource: string;
rememberedTarget: string | undefined;
rootImportShellOutputFile: string;
shouldKeep: () => boolean | undefined;
shouldMoveToOrigin: () => boolean | undefined;
}
export interface FrameworkRootImportShellPlan {
isCurrentImportShell: boolean;
reusableTarget: string | undefined;
targetToRemember: string | undefined;
}
export declare function resolveFrameworkRootImportShellPlan(options: ResolveFrameworkRootImportShellPlanOptions): FrameworkRootImportShellPlan;
export declare function restoreFrameworkRootMiniProgramImportShellAssets(bundle: OutputBundle, options: {
debug?: ((format: string, ...args: unknown[]) => void) | undefined;
isWebGeneratorTarget: boolean;
matchesCss: (file: string) => boolean;
onUpdate?: ((file: string, oldVal: string, newVal: string) => void) | undefined;
recordCssAssetResult?: ((file: string, css: string) => void) | undefined;
shouldKeep: (file: string, css: string) => boolean | undefined;
targetByFile: ReadonlyMap<string, string>;
}): number;
export declare function shouldMoveRootMiniProgramStyleToImportShellOrigin(enabled: boolean | undefined): enabled is true;