UNPKG

940 BTypeScriptView Raw
1import { IResult } from '../common';
2export declare type BuildFormat = 'COMMON_JS' | 'ES_MODULE';
3export declare type IBuildArgs = {
4 silent?: boolean;
5 watch?: boolean;
6 dir?: string;
7 outDir?: string;
8 tsconfig?: string;
9};
10export declare function buildAs(formats: BuildFormat[], args?: IBuildArgs): Promise<IResult>;
11declare type IArgs = IBuildArgs & {
12 as?: BuildFormat;
13};
14export declare function build(args: IArgs): Promise<IResult & {
15 errorLog?: string;
16}>;
17export declare function processArgs(args: IArgs): Promise<{
18 code: number;
19 error: Error;
20 cwd?: undefined;
21 outDir?: undefined;
22 silent?: undefined;
23 watch?: undefined;
24 as?: undefined;
25 tsconfig?: undefined;
26} | {
27 code: number;
28 cwd: string;
29 outDir: string;
30 silent: boolean | undefined;
31 watch: boolean | undefined;
32 as: BuildFormat;
33 tsconfig: string | undefined;
34 error?: undefined;
35}>;
36export {};