MCPcopy Create free account
hub / github.com/TanStack/cli / cleanUpFiles

Function cleanUpFiles

packages/create/src/edge-file-helpers.ts:93–103  ·  view source on GitHub ↗
(
  files: Record<string, string>,
  targetDir?: string,
)

Source from the content-addressed store, hash-verified

91}
92
93export function cleanUpFiles(
94 files: Record<string, string>,
95 targetDir?: string,
96) {
97 return Object.keys(files).reduce<Record<string, string>>((acc, file) => {
98 if (basenamePath(file) !== '.cta.json') {
99 acc[targetDir ? toCleanPath(file, targetDir) : file] = files[file]
100 }
101 return acc
102 }, {})
103}
104
105export function cleanUpFileArray(files: Array<string>, targetDir?: string) {
106 return files.reduce<Array<string>>((acc, file) => {

Callers

nothing calls this directly

Calls 2

basenamePathFunction · 0.85
toCleanPathFunction · 0.70

Tested by

no test coverage detected