UNPKG

vite-plugin-shopify-theme-islands

Version:
13 lines (12 loc) 937 B
/** Matches .ts or .js extension. Exported for plugin transform/watch filters. */ export declare const TS_JS_RE: RegExp; /** Matches the island mixin import. Exported for plugin transform/watch detection. */ export declare const ISLAND_IMPORT_RE: RegExp; /** True if file is under any of the given absolute directory paths. */ export declare function inDirectory(file: string, absDirs: string[]): boolean; /** Paths for load() virtual module: "/relative/to/root" form, forward slashes. */ export declare function getIslandPathsForLoad(islandFiles: Set<string>, root: string): string[]; /** Scan from root for files containing the island import; returns paths (not in absDirs). */ export declare function discoverIslandFiles(root: string, absDirs: string[]): Set<string>; /** Tag names (filename without extension) for TS/JS files in a directory. Used for debug logging. */ export declare function collectTagNames(dir: string): string[];