MCPcopy Create free account
hub / github.com/expo/expo / transformFileAsync

Function transformFileAsync

tools/src/Transforms.ts:115–121  ·  view source on GitHub ↗
(
  filePath: string,
  transforms: StringTransform[] | null | undefined
)

Source from the content-addressed store, hash-verified

113 * Transforms file's content in-place.
114 */
115export async function transformFileAsync(
116 filePath: string,
117 transforms: StringTransform[] | null | undefined
118): Promise<void> {
119 const content = await fs.readFile(filePath, 'utf8');
120 await fs.outputFile(filePath, transformString(content, transforms));
121}
122
123/**
124 * Transforms multiple files' content in-place.

Callers 2

actionFunction · 0.90

Calls 1

transformStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…