UNPKG

1.08 kBTypeScriptView Raw
1import * as babel from '@babel/core';
2export declare const BABEL_CONFIG: string;
3declare type SupportedEnvironments = 'commonjs' | 'module';
4export interface SuccessState {
5 /** Whether the transpilation was successful. */
6 success: boolean;
7}
8/** Transpiled the file to all of the supported formats. */
9export declare function getJSOutputFiles(inFile: string, inDir: string, outDir: string): {
10 cjsFile: string;
11 mjsFile: string;
12};
13/** Load @design-systems/cli's default babel.config.js */
14export declare function getBabelConfig(filename: string, envName?: SupportedEnvironments, configFile?: string): babel.PartialConfig;
15/** Load the options (cli's + user) for babel. */
16export declare function getBabelOptions(filename: string, envName?: SupportedEnvironments, configFile?: string): babel.TransformOptions;
17/**
18 * Transpile a JS file using babel.
19 * Write the CJS and ESM versions to disk.
20 */
21export default function transpile(inFile: string, inDir: string, outDir: string, configFile: string): Promise<SuccessState>;
22export {};
23//# sourceMappingURL=babel.d.ts.map
\No newline at end of file