UNPKG

938 BTypeScriptView Raw
1export interface Minapp {
2 component?: string;
3 compiler?: {
4 px2rpx?: boolean;
5 rpx2px?: boolean;
6 browsers?: string[];
7 devServer?: {
8 [key: string]: any;
9 };
10 };
11}
12export interface CompilerOptions {
13 minapp?: Minapp;
14 watch?: boolean;
15 production?: boolean;
16 minimize?: boolean;
17 babelRuntime?: boolean | {
18 [key: string]: any;
19 };
20 publicPath?: string;
21 staticDir: string;
22 server?: {
23 contentBase: string;
24 host: string;
25 port: string;
26 [key: string]: any;
27 };
28}
29export declare class Compiler {
30 production: boolean;
31 minimize: boolean;
32 srcDir: string;
33 distDir: string;
34 modulesDir: string;
35 options: CompilerOptions;
36 localPkg: any;
37 rootDir: string;
38 constructor(srcDir: string, distDir: string, options?: Partial<CompilerOptions>);
39 private init(options?);
40 build(): void;
41}