1 | import postcss from 'postcss';
|
2 | import { PostCSSConfig } from 'postcss-load-config';
|
3 | /** Get the output path for a css file. */
|
4 | export declare function getCSSPath(inFile: string, inDir: string, outDir: string): string;
|
5 | interface LoadOptions {
|
6 | /** Use css modules */
|
7 | useModules?: boolean;
|
8 | /** The path to the config file */
|
9 | configFile?: string;
|
10 | /** Where to store the build results */
|
11 | outDir?: string;
|
12 | /** Dir to start looking for configs in */
|
13 | cwd?: string;
|
14 | /**
|
15 | * Report whether there were errors when loading the config.
|
16 | * If we are building a package that runs before everything is built
|
17 | * and it doesn't have css (in the typescript build). We don't care about the error.
|
18 | */
|
19 | reportError?: boolean;
|
20 | }
|
21 | /** Load the user's postcss config or our default. */
|
22 | export declare function getPostCssConfig({ useModules, configFile, outDir, cwd, reportError }: LoadOptions): Promise<PostCSSConfig>;
|
23 | /** Load the user's postcss config or our default synchronously. */
|
24 | export declare function getPostCssConfigSync({ useModules, configFile, outDir, cwd, reportError }: LoadOptions): PostCSSConfig;
|
25 | interface TranspileOptions {
|
26 | /** Css file to transpile */
|
27 | inFile: string;
|
28 | /** Directory file is in */
|
29 | inDir: string;
|
30 | /** Directory to put the build output */
|
31 | outDir: string;
|
32 | /** Where the postcss.config is */
|
33 | configFile: string;
|
34 | /** The builder was started in watch mode */
|
35 | watch: boolean;
|
36 | }
|
37 | /**
|
38 | * Transpile a CSS file using babel.
|
39 | * Write the CJS version to disk.
|
40 | * Write the transpiled version to disk.
|
41 | *
|
42 | * @returns the transpiled CSS
|
43 | */
|
44 | export default function transpile({ inFile, inDir, outDir, configFile, watch }: TranspileOptions): Promise<postcss.Result | void>;
|
45 | export {};
|
46 | //# sourceMappingURL=postcss.d.ts.map |
\ | No newline at end of file |