MCPcopy
hub / github.com/freshframework/fresh / replaceInFile

Function replaceInFile

tools/release.ts:89–96  ·  view source on GitHub ↗
(
  file: string,
  replacer: (content: string) => string,
)

Source from the content-addressed store, hash-verified

87) as DenoJson;
88
89async function replaceInFile(
90 file: string,
91 replacer: (content: string) => string,
92) {
93 const raw = await Deno.readTextFile(file);
94 const replaced = replacer(raw);
95 await Deno.writeTextFile(file, replaced);
96}
97
98const nextVersion = semver.format(next);
99

Callers 1

release.tsFile · 0.85

Calls 1

readTextFileMethod · 0.80

Tested by

no test coverage detected