MCPcopy
hub / github.com/QwikDev/qwik / transformFile

Function transformFile

packages/docs/codesandbox.sync.ts:24–31  ·  view source on GitHub ↗
(
  path: string,
  lineTransformFn: (path: string, lines: string[]) => string[]
)

Source from the content-addressed store, hash-verified

22}
23
24function transformFile(
25 path: string,
26 lineTransformFn: (path: string, lines: string[]) => string[]
27): void {
28 const lines = readFile(path);
29 const newLines = lineTransformFn(path, lines);
30 writeFileSync(path, newLines.join('\n'));
31}
32
33function readFile(path: string) {
34 try {

Callers 1

syncCodeSandboxesFunction · 0.85

Calls 2

readFileFunction · 0.85
joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…