UNPKG

1.43 kBTypeScriptView Raw
1import { PreprocessorGroup, Processed, TransformerArgs, TransformerOptions, Options } from './types';
2declare type AutoPreprocessGroup = PreprocessorGroup & {
3 defaultLanguages: Readonly<{
4 markup: string;
5 style: string;
6 script: string;
7 }>;
8};
9declare type AutoPreprocessOptions = {
10 markupTagName?: string;
11 aliases?: Array<[string, string]>;
12 preserve?: string[];
13 defaults?: {
14 markup?: string;
15 style?: string;
16 script?: string;
17 };
18 sourceMap?: boolean;
19 babel?: TransformerOptions<Options.Babel>;
20 typescript?: TransformerOptions<Options.Typescript>;
21 scss?: TransformerOptions<Options.Sass>;
22 sass?: TransformerOptions<Options.Sass>;
23 less?: TransformerOptions<Options.Less>;
24 stylus?: TransformerOptions<Options.Stylus>;
25 postcss?: TransformerOptions<Options.Postcss>;
26 coffeescript?: TransformerOptions<Options.Coffeescript>;
27 pug?: TransformerOptions<Options.Pug>;
28 globalStyle?: Options.GlobalStyle | boolean;
29 replace?: Options.Replace;
30 [languageName: string]: TransformerOptions;
31};
32export declare const runTransformer: (name: string, options: TransformerOptions, { content, map, filename, attributes }: TransformerArgs<any>) => Promise<Processed>;
33export declare function sveltePreprocess({ aliases, markupTagName, preserve, defaults, sourceMap, ...rest }?: AutoPreprocessOptions): AutoPreprocessGroup;
34export {};