2.14 kBTypeScriptView Raw
1import { BuildContext, TaskInfo } from './interfaces';
3 * Create a context object which is used by all the build tasks.
4 * Filling the config data uses the following hierarchy, which will
5 * keep going down the list until it, or if it, finds data.
6 *
7 * 1) Get from the passed in context variable
8 * 2) Get from the config file set using the command-line args
9 * 3) Get from environment variable
10 * 4) Get from package.json config property
11 * 5) Get environment variables
12 *
13 * Lastly, Ionic's default configs will always fill in any data
14 * which is missing from the user's data.
15 */
16export declare function generateContext(context?: BuildContext): BuildContext;
17export declare function getUserConfigFile(context: BuildContext, task: TaskInfo, userConfigFile: string): string;
18export declare function fillConfigDefaults(userConfigFile: string, defaultConfigFile: string): any;
19export declare function bundlerStrategy(context: BuildContext): string;
20export declare function getConfigValue(context: BuildContext, argFullName: string, argShortName: string, envVarName: string, packageConfigProp: string, defaultValue: string): any;
21export declare function hasConfigValue(context: BuildContext, argFullName: string, argShortName: string, envVarName: string, defaultValue: boolean): boolean;
22export declare function hasArg(fullName: string, shortName?: string): boolean;
23export declare function replacePathVars(context: BuildContext, filePath: string | string[] | {
24 [key: string]: any;
25}): any;
26export declare function getNodeBinExecutable(context: BuildContext, cmd: string): string;
27export declare function isDebugMode(): boolean;
28export declare function setProcessArgs(argv: string[]): void;
29export declare function addArgv(value: string): void;
30export declare function setProcessEnv(env: any): void;
31export declare function setProcessEnvVar(key: string, value: any): void;
32export declare function getProcessEnvVar(key: string): any;
33export declare function setCwd(cwd: string): void;
34export declare function getPackageJsonConfig(context: BuildContext, key: string): any;
35export declare function setAppPackageJsonData(data: any): void;