MCPcopy
hub / github.com/infinitered/ignite / copy

Function copy

src/tools/cache.ts:49–65  ·  view source on GitHub ↗
(options: CopyOptions)

Source from the content-addressed store, hash-verified

47 platform?: NodeJS.Platform
48}
49function copy(options: CopyOptions) {
50 const { fromRootDir, toRootDir, packagerName, platform = process.platform } = options
51
52 const fromTargets = targets({ rootDir: fromRootDir, packagerName, platform })
53 const toTargets = targets({ rootDir: toRootDir, packagerName, platform })
54
55 return Promise.all(
56 fromTargets.map((from, index) => {
57 const to = toTargets[index]
58 if (from.type === "dir") {
59 dir(from.path)
60 }
61
62 return filesystem.copyAsync(from.path, to.path, { overwrite: true })
63 }),
64 )
65}
66
67// Root directory path of ignite dependency cache
68function rootdir(platform: NodeJS.Platform = process.platform) {

Callers 3

installGeneratorsFunction · 0.85
generateAppIconsFunction · 0.85
new.tsFile · 0.85

Calls 1

targetsFunction · 0.85

Tested by

no test coverage detected