Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

UnocssPluginContext

interface UnocssPluginContext <Config extends UserConfig = UserConfig> {
affectedModules: Set<string>;
extract: (code: string, id?: string) => Promise<void>;
filter: (code: string, id: string) => boolean;
getConfig: () => Promise<Config>;
getConfigFileList: () => string[];
invalidate: () => void;
modules: BetterMap<string, string>;
onInvalidate: (fn: () => void) => void;
onReload: (fn: () => void) => void;
ready: Promise<LoadConfigResult<Config>>;
reloadConfig: () => Promise<LoadConfigResult<Config>>;
root: string;
tasks: Promise<any>[];
tokens: Set<string>;
updateRoot: (root: string) => Promise<LoadConfigResult<Config>>;
flushTasks(): Promise<any>;
}

§Type Parameters

§
Config extends UserConfig = UserConfig
[src]

§Properties

§
affectedModules: Set<string>
[src]

Module IDs that been affected by UnoCSS

§
extract: (code: string, id?: string) => Promise<void>
[src]
§
filter: (code: string, id: string) => boolean
[src]
§
getConfig: () => Promise<Config>
[src]
§
getConfigFileList: () => string[]
[src]
§
invalidate: () => void
[src]
§
modules: BetterMap<string, string>
[src]

Map for all module's raw content

§
onInvalidate: (fn: () => void) => void
[src]
§
onReload: (fn: () => void) => void
[src]
§
ready: Promise<LoadConfigResult<Config>>
[src]
§
reloadConfig: () => Promise<LoadConfigResult<Config>>
[src]
§
root: string
[src]
§
tasks: Promise<any>[]
[src]

Pending promises

§
tokens: Set<string>
[src]

All tokens scanned

§
updateRoot: (root: string) => Promise<LoadConfigResult<Config>>
[src]

§Methods

§
flushTasks(): Promise<any>
[src]

Await all pending tasks