UNPKG

4.57 kBTypeScriptView Raw
1import { BuildError } from './errors';
2import { BuildContext, DeepLinkConfigEntry, WebpackStats, SemverVersion } from './interfaces';
3export declare function getAppScriptsPackageJson(): any;
4export declare function getAppScriptsVersion(): string;
5export declare function getSystemText(userRootDir: string): string[];
6export declare function getSystemData(userRootDir: string): {
7 ionicAppScripts: string;
8 ionicFramework: string;
9 ionicNative: string;
10 angularCore: string;
11 angularCompilerCli: string;
12 node: string;
13 osName: any;
14};
15export declare function splitLineBreaks(sourceText: string): string[];
16export declare const objectAssign: {
17 <T, U>(target: T, source: U): T & U;
18 <T, U, V>(target: T, source1: U, source2: V): T & U & V;
19 <T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
20 (target: object, ...sources: any[]): any;
21};
22export declare function titleCase(str: string): string;
23export declare function writeFileAsync(filePath: string, content: string): Promise<{}>;
24export declare function readFileAsync(filePath: string): Promise<string>;
25export declare function readJsonAsync(filePath: string): Promise<any>;
26export declare function readAndCacheFile(filePath: string, purge?: boolean): Promise<string>;
27export declare function unlinkAsync(filePath: string | string[]): Promise<any>;
28export declare function rimRafAsync(directoryPath: string): Promise<void>;
29export declare function copyFileAsync(srcPath: string, destPath: string): Promise<void>;
30export declare function mkDirpAsync(directoryPath: string): Promise<{}>;
31export declare function readDirAsync(pathToDir: string): Promise<string[]>;
32export declare function setContext(context: BuildContext): void;
33export declare function getContext(): BuildContext;
34export declare function setParsedDeepLinkConfig(map: Map<string, DeepLinkConfigEntry>): void;
35export declare function getParsedDeepLinkConfig(): Map<string, DeepLinkConfigEntry>;
36export declare function transformSrcPathToTmpPath(originalPath: string, context: BuildContext): string;
37export declare function transformTmpPathToSrcPath(originalPath: string, context: BuildContext): string;
38export declare function changeExtension(filePath: string, newExtension: string): string;
39export declare function escapeHtml(unsafe: string): string;
40export declare function escapeStringForRegex(input: string): string;
41export declare function rangeReplace(source: string, startIndex: number, endIndex: number, newContent: string): string;
42export declare function stringSplice(source: string, startIndex: number, numToDelete: number, newContent: string): string;
43export declare function toUnixPath(filePath: string): string;
44export declare function generateRandomHexString(numCharacters: number): string;
45export declare function getStringPropertyValue(propertyName: string): string;
46export declare function getIntPropertyValue(propertyName: string): number;
47export declare function getBooleanPropertyValue(propertyName: string): boolean;
48export declare function convertFilePathToNgFactoryPath(filePath: string): string;
49export declare function printDependencyMap(map: Map<string, Set<string>>): void;
50export declare function webpackStatsToDependencyMap(context: BuildContext, stats: any): Map<string, Set<string>>;
51export declare function processStatsImpl(webpackStats: WebpackStats): Map<string, Set<string>>;
52export declare function purgeWebpackPrefixFromPath(filePath: string): string;
53export declare function replaceAll(input: string, toReplace: string, replacement: string): string;
54export declare function ensureSuffix(input: string, suffix: string): string;
55export declare function removeSuffix(input: string, suffix: string): string;
56export declare function buildErrorToJson(buildError: BuildError): {
57 message: string;
58 name: string;
59 stack: string;
60 hasBeenLogged: boolean;
61 isFatal: boolean;
62};
63export declare function jsonToBuildError(nonTypedBuildError: any): BuildError;
64export declare function upperCaseFirst(input: string): string;
65export declare function sentenceCase(input: string): string;
66export declare function snakeCase(input: string): string;
67export declare function constantCase(input: string): string;
68export declare function camelCase(input: string): string;
69export declare function paramCase(input: string): string;
70export declare function pascalCase(input: string): string;
71export declare function removeCaseFromString(input: string, inReplacement?: string): string;
72export declare function semverStringToObject(semverString: string): SemverVersion;