MCPcopy Index your code
hub / github.com/angular/angular-cli / replaceInFile

Function replaceInFile

tests/e2e/utils/fs.ts:61–65  ·  view source on GitHub ↗
(filePath: string, match: RegExp | string, replacement: string)

Source from the content-addressed store, hash-verified

59}
60
61export function replaceInFile(filePath: string, match: RegExp | string, replacement: string) {
62 return readFile(filePath).then((content: string) =>
63 writeFile(filePath, content.replace(match, replacement)),
64 );
65}
66
67export function appendToFile(filePath: string, text: string, options?: any) {
68 return readFile(filePath).then((content: string) =>

Callers 15

useCIChromeFunction · 0.90
setupI18nConfigFunction · 0.90
trusted-types.tsFile · 0.90
es2015-nometa.tsFile · 0.90
browsers.tsFile · 0.90
rebuild.tsFile · 0.90
snapshot.tsFile · 0.90
ssr-base-href.tsFile · 0.90

Calls 2

readFileFunction · 0.70
writeFileFunction · 0.70

Tested by

no test coverage detected