UNPKG

@lusito/require-libs

Version:

Some libraries to setup require hooks

28 lines (27 loc) 1.05 kB
import { OutputStyle } from "sass"; import { TokenTransformerConfig } from "./transformTokens"; import { ScopedNameGeneratorFactory } from "./scopedNameGenerator"; export type ScssCompilerOptions = { style: OutputStyle; generateScopedNames?: boolean | ScopedNameGeneratorFactory; preprocessCss?: (code: string, filename: string) => string; processCss?: (code: string, filename: string) => string; mapFileUrl?: (fileUrl: string) => string; transformToken?: null | TokenTransformerConfig; }; export type MappedFile = { source: string; destination: string; }; export type CssModule = { __CSS: string; __FILES: MappedFile[]; } & Record<string, string>; export type CompiledResult = { css: string; tokens: Record<string, string>; fileMappings: MappedFile[]; }; type Compiler = (code: string, filename: string) => CompiledResult; export declare function createScssCompiler({ generateScopedNames, preprocessCss, processCss, mapFileUrl, style, transformToken, }: ScssCompilerOptions): Compiler; export {};