MCPcopy Create free account
hub / github.com/fabien0102/openapi-codegen / writeFile

Method writeFile

cli/src/commands/GenerateCommand.ts:239–249  ·  view source on GitHub ↗
(file: string, data: string)

Source from the content-addressed store, hash-verified

237 const prettierConfig = await prettier.resolveConfig(process.cwd());
238
239 const writeFile = async (file: string, data: string) => {
240 const updatedConfig = await prettier.format(data, {
241 parser: "babel-ts",
242 ...prettierConfig,
243 });
244
245 await fsExtra.outputFile(
246 path.join(process.cwd(), config.outputDir, file),
247 updatedConfig
248 );
249 };
250
251 const readFile = (file: string) => {
252 return fsExtra.readFile(

Callers 4

executeMethod · 0.80
generateSchemaTypesFunction · 0.80
generateFetchersFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected