UNPKG

replacer-util

Version:

Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)

37 lines (35 loc) 977 B
//! replacer-util v1.3.2 ~~ https://github.com/center-key/replacer-util ~~ MIT License export type Settings = { cd: string | null; concat: string | null; content: string | null; exclude: string | null; extensions: string[]; filename: string | null; find: string | null; header: string | null; noSourceMap: boolean; regex: RegExp | null; rename: string | null; replacement: string | null; templatingOn: boolean; }; export type Results = { source: string; target: string; count: number; duration: number; files: { origin: string; dest: string; }[]; }; export type ResultsFile = Results['files'][0]; export type ReporterSettings = { summaryOnly: boolean; }; declare const replacer: { transform(sourceFolder: string, targetFolder: string, options?: Partial<Settings>): Results; reporter(results: Results, options?: Partial<ReporterSettings>): Results; }; export { replacer };