weapp-tailwindcss
Version:
把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!
39 lines (38 loc) • 1.71 kB
TypeScript
import type { createViteCssMemory } from '../css-memory.js';
import type { createViteRuntimeClassSet } from '../runtime-class-set.js';
import type { createSourceCandidateCollector } from '../source-candidates.js';
import type { createViteHmrCandidateState } from './framework-hmr-candidate-state.js';
type SourceCandidateCollector = ReturnType<typeof createSourceCandidateCollector>;
type CssMemory = ReturnType<typeof createViteCssMemory>;
type RuntimeState = ReturnType<typeof createViteRuntimeClassSet>['runtimeState'];
type HmrCandidateState = ReturnType<typeof createViteHmrCandidateState>;
interface FrameworkSourceScanSessionOptions {
cssMemory: CssMemory;
debug: (...args: any[]) => void;
getResolvedConfig: () => any;
hmrCandidateState: HmrCandidateState;
isCandidateRequest: (id: string) => boolean;
isWatchLikeBuild: () => boolean;
opts: any;
runtimeState: RuntimeState;
shouldOwnTailwindGeneration: boolean;
sourceCandidateCollector: SourceCandidateCollector;
}
export declare function createFrameworkSourceScanSession(options: FrameworkSourceScanSessionOptions): {
cacheCurrent: () => void;
getStats: () => {
pendingSourceCandidateSyncByFile: number;
pendingSourceCandidateSyncs: number;
sourceCandidateScanCache: number;
};
invalidate: () => void;
isDependency: (file: string) => boolean;
matches: (file: string) => boolean;
shouldDiscoverAutoCssSources: (autoCssSourcesDiscovered: boolean) => boolean;
sync: (syncOptions?: {
force?: boolean;
}) => Promise<void>;
syncChangedFile: (id: string, sourceOverride?: string) => any;
waitForPendingSyncs: () => Promise<void>;
};
export {};