@gobstones/gobstones-scripts
Version:
Scripts to abstract away build configuration of Gobstones Project's libraries and modules.
34 lines • 991 B
TypeScript
/**
* This type represents the options that you can pass to the replace task.
*/
export interface TaskReplaceOptions {
/**
* The text or regular expression to be matched.
*/
match: string;
/**
* The text used to replaced the matched text.
* If none given, the empty string is used, so
* it acts as a delete text command.
*/
replace?: string;
/**
* The file on which to replace the text.
* If a folder or glob pattern is given, it acts
* recursively on that folder or glob.
*/
file: string;
}
/**
* Returns the string for the bash command to run
* a replacement of text in a file or set of files
* within a folder.
*
* @param options - The options applied when running the replacement.
*
* @example replace({ match: 'foo', replace: 'bar', file: '*.txt' })
*
* @returns The bash command string.
*/
export declare const replace: (options: TaskReplaceOptions) => string;
//# sourceMappingURL=replace.d.ts.map