1 | import { PromptModule } from '@ionic/cli-framework';
|
2 | import { BaseBuildOptions, BuildOptions, CommandLineInputs, CommandLineOptions, CommandMetadata, CommandMetadataOption, IConfig, ILogger, IProject, IShell, Runner } from '../definitions';
|
3 | export declare const BUILD_SCRIPT = "ionic:build";
|
4 | export declare const COMMON_BUILD_COMMAND_OPTIONS: ReadonlyArray<CommandMetadataOption>;
|
5 | export interface BuildRunnerDeps {
|
6 | readonly config: IConfig;
|
7 | readonly log: ILogger;
|
8 | readonly project: IProject;
|
9 | readonly prompt: PromptModule;
|
10 | readonly shell: IShell;
|
11 | }
|
12 | export declare abstract class BuildRunner<T extends BuildOptions<any>> implements Runner<T, void> {
|
13 | protected abstract readonly e: BuildRunnerDeps;
|
14 | abstract getCommandMetadata(): Promise<Partial<CommandMetadata>>;
|
15 | abstract createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): T;
|
16 | abstract buildProject(options: T): Promise<void>;
|
17 | createBaseOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): BaseBuildOptions;
|
18 | determineEngineFromCommandLine(options: CommandLineOptions): string;
|
19 | beforeBuild(options: T): Promise<void>;
|
20 | run(options: T): Promise<void>;
|
21 | afterBuild(options: T): Promise<void>;
|
22 | }
|
23 | export declare abstract class BuildCLI<T extends object> {
|
24 | protected readonly e: BuildRunnerDeps;
|
25 | |
26 |
|
27 |
|
28 | abstract readonly name: string;
|
29 | |
30 |
|
31 |
|
32 | abstract readonly pkg: string;
|
33 | |
34 |
|
35 |
|
36 | abstract readonly program: string;
|
37 | |
38 |
|
39 |
|
40 |
|
41 | abstract readonly script?: string;
|
42 | resolvedProgram: string;
|
43 | constructor(e: BuildRunnerDeps);
|
44 | /**
|
45 | * Build the arguments for starting this Build CLI. Called by `this.run()`.
|
46 | */
|
47 | protected abstract buildArgs(options: T): Promise<string[]>;
|
48 | build(options: T): Promise<void>;
|
49 | protected runWrapper(options: T): Promise<void>;
|
50 | protected run(options: T): Promise<void>;
|
51 | protected resolveProgram(): Promise<string>;
|
52 | protected promptToInstall(): Promise<boolean>;
|
53 | }
|
54 | export declare function build(deps: BuildRunnerDeps, inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;
|