UNPKG

823 BTypeScriptView Raw
1import { template } from 'mrm-core';
2import { File } from '../Base/File';
3/**
4 * Exposes the API to generate source files from template files.
5 */
6export declare class TemplateLiteralFile extends File {
7 protected actions: never[];
8 filePointer: ReturnType<typeof template>;
9 removeOnRollback: boolean;
10 overwrite: boolean;
11 constructor(basePath: string, filename: string, templatePath: string);
12 /**
13 * Returns existing contents for a template file
14 */
15 get(): string;
16 /**
17 * A boolean telling if the file already exists
18 */
19 exists(): boolean;
20 /**
21 * Apply contents to the template to evaluate it's output
22 */
23 apply(contents?: any): this;
24 /**
25 * Commit changes
26 */
27 commit(): void;
28 /**
29 * Rollback changes
30 */
31 rollback(): void;
32}