@tylertech/forge-build-tools
Version:
Node utilities for building and packaging libraries.
16 lines (15 loc) • 551 B
TypeScript
export interface IFileDescriptor {
filepath: string;
changed: boolean;
}
export interface IModifyFileInfo {
contents: string;
filepath: string;
}
export declare type Modifier = (fileInfo: IModifyFileInfo) => Promise<string> | string;
/**
* Modifies the contents of each of the provided files by calling the `modifier` function on each file.
* @param files The files to modify.
* @param modifier The modifier function.
*/
export declare function modifyFile(files: string[] | string, modifier: Modifier): Promise<IFileDescriptor[]>;