UNPKG

@bubblewrap/core

Version:

Core Library to generate, build and sign TWA projects

40 lines (39 loc) 1.5 kB
import { TwaManifest } from './TwaManifest'; import { Log } from './Log'; export type twaGeneratorProgress = (progress: number, total: number) => void; /** * Generates TWA Projects from a TWA Manifest */ export declare class TwaGenerator { private imageHelper; private copyStaticFile; private copyStaticFiles; private applyTemplate; private applyTemplateList; private applyJavaTemplate; private applyJavaTemplates; private applyTemplateMap; private generateIcons; private writeWebManifest; /** * Generates shortcut data for a new TWA Project. * * @param {String} targetDirectory the directory where the project will be created * @param {String} templateDirectory the directory where templates are located. * @param {Object} twaManifest configurations values for the project. */ private generateShortcuts; private static generateShareTargetIntentFilter; /** * Creates a new TWA Project. * * @param {String} targetDirectory the directory where the project will be created * @param {Object} twaManifest configurations values for the project. */ createTwaProject(targetDirectory: string, twaManifest: TwaManifest, log: Log, reportProgress?: twaGeneratorProgress): Promise<void>; /** * Removes all files generated by crateTwaProject. * @param targetDirectory the directory where the project was created. */ removeTwaProject(targetDirectory: string): Promise<void>; }