1 |
|
2 | import { CreateFilter } from 'rollup-pluginutils';
|
3 | import type { Plugin } from 'rollup';
|
4 | export interface CSSPluginOptions {
|
5 | exclude?: Parameters<CreateFilter>[1];
|
6 | failOnError?: boolean;
|
7 |
|
8 | fileName?: string;
|
9 | include?: Parameters<CreateFilter>[0];
|
10 | includePaths?: string[];
|
11 | insert?: boolean;
|
12 |
|
13 | name?: string;
|
14 |
|
15 | output?: string | false | ((css: string, styles: Styles) => void);
|
16 | prefix?: string;
|
17 | processor?: (css: string, map: string, styles: Styles) => CSS | Promise<CSS> | PostCSSProcessor;
|
18 | sass?: SassRenderer;
|
19 | sourceMap?: boolean;
|
20 | verbose?: boolean;
|
21 | watch?: string | string[];
|
22 | outputStyle?: string;
|
23 | }
|
24 | type CSS = string | {
|
25 | css: string;
|
26 | map: string;
|
27 | };
|
28 | interface MappedCSS {
|
29 | css: string;
|
30 | map: string;
|
31 | }
|
32 | interface Styles {
|
33 | [id: string]: string;
|
34 | }
|
35 | interface PostCSSProcessor {
|
36 | process: (css: string, options?: any) => MappedCSS;
|
37 | }
|
38 | interface SassRenderer {
|
39 | renderSync: (options: SassOptions) => SassResult;
|
40 | }
|
41 | interface SassOptions {
|
42 | data: string;
|
43 | }
|
44 | interface SassResult {
|
45 | css: Buffer;
|
46 | map?: Buffer;
|
47 | }
|
48 | export default function scss(options?: CSSPluginOptions): Plugin;
|
49 | export {};
|