MCPcopy Create free account
hub / github.com/testing-library/react-hooks-testing-library / makeFile

Function makeFile

scripts/generate-submodules.ts:42–51  ·  view source on GitHub ↗
(directory: string, submodule: string)

Source from the content-addressed store, hash-verified

40}
41
42function makeFile(directory: string, submodule: string) {
43 return ([name, extensions]: [string, Record<string, Template>]) => {
44 Object.entries(extensions).forEach(([extension, template]) => {
45 const fileName = `${name}${extension}`
46 console.log(` - ${fileName}`)
47 const filePath = path.join(directory, fileName)
48 fs.writeFileSync(filePath, template(submodule))
49 })
50 }
51}
52
53function makeFiles(directory: string, submodule: string) {
54 Object.entries(templates).filter(requiredFile(submodule)).forEach(makeFile(directory, submodule))

Callers 1

makeFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…