MCPcopy
hub / github.com/webpro/reveal-md / cp

Function cp

lib/static.js:31–39  ·  view source on GitHub ↗
(source, target)

Source from the content-addressed store, hash-verified

29 file.replace(/^.*(reveal-md\/node_modules.+)/, '$1').replace(new RegExp(`^${process.cwd()}/`), '');
30
31const cp = (source, target) => {
32 if (!files.has(target)) {
33 files.add(target);
34 console.log(`❏ ${readablePath(source)} → ${target}`);
35 return fs.copy(source, target);
36 } else {
37 return Promise.resolve();
38 }
39};
40
41const write = (target, content) => {
42 console.log(`★ ${target}`);

Callers 4

copyAssetsFromOptionsFunction · 0.85
copyAssetsAndWriteFileFunction · 0.85
writeMarkupFilesFunction · 0.85
static.jsFile · 0.85

Calls 1

readablePathFunction · 0.85

Tested by

no test coverage detected