UNPKG

2.44 kBTypeScriptView Raw
1import { BuildContext } from '../util/interfaces';
2import { GlobResult } from '../util/glob-util';
3export declare function hydrateRequest(context: BuildContext, request: GeneratorRequest): HydratedGeneratorRequest;
4export declare function createCommonModule(envVar: string, requestType: string): void;
5export declare function hydrateTabRequest(context: BuildContext, request: GeneratorTabRequest): HydratedGeneratorRequest;
6export declare function readTemplates(pathToRead: string): Promise<Map<string, string>>;
7export declare function filterOutTemplates(request: HydratedGeneratorRequest, templates: Map<string, string>): Map<string, string>;
8export declare function applyTemplates(request: HydratedGeneratorRequest, templates: Map<string, string>): Map<string, string>;
9export declare function writeGeneratedFiles(request: HydratedGeneratorRequest, processedTemplates: Map<string, string>): Promise<string[]>;
10export declare function getNgModules(context: BuildContext, types: string[]): Promise<GlobResult[]>;
11export declare function getDirToWriteToByType(context: BuildContext, type: string): string;
12export declare function nonPageFileManipulation(context: BuildContext, name: string, ngModulePath: string, type: string): Promise<void>;
13export declare function tabsModuleManipulation(tabs: string[][], hydratedRequest: HydratedGeneratorRequest, tabHydratedRequests: HydratedGeneratorRequest[]): Promise<any>;
14export declare function generateTemplates(context: BuildContext, request: HydratedGeneratorRequest, includePageConstants?: boolean): Promise<string[]>;
15export declare function createConstStatments(pageConstantFile: string, request: HydratedGeneratorRequest): void;
16export declare function createPageConstants(context: BuildContext): void;
17export interface GeneratorOption {
18 type: string;
19 multiple: boolean;
20}
21export interface GeneratorRequest {
22 type?: string;
23 name?: string;
24 includeSpec?: boolean;
25 includeNgModule?: boolean;
26}
27export interface GeneratorTabRequest extends GeneratorRequest {
28 tabs?: HydratedGeneratorRequest[];
29}
30export interface HydratedGeneratorRequest extends GeneratorRequest {
31 fileName?: string;
32 importStatement?: string;
33 ionicPage?: string;
34 className?: string;
35 tabContent?: string;
36 tabVariables?: string;
37 tabsImportStatement?: string;
38 dirToRead?: string;
39 dirToWrite?: string;
40 generatedFileNames?: string[];
41 pipeName?: string;
42}