MCPcopy Index your code
hub / github.com/remix-run/react-router / writeFileSafe

Function writeFileSafe

packages/react-router-dev/vite/plugin.ts:486–489  ·  view source on GitHub ↗
(file: string, contents: string)

Source from the content-addressed store, hash-verified

484}
485
486const writeFileSafe = async (file: string, contents: string): Promise<void> => {
487 await mkdir(path.dirname(file), { recursive: true });
488 await writeFile(file, contents);
489};
490
491const getExportNames = (code: string): string[] => {
492 let [, exportSpecifiers] = esModuleLexer(code);

Callers 1

Calls 1

writeFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…