MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / addSources

Method addSources

tools/ffi.js:299–315  ·  view source on GitHub ↗
(tool, sources)

Source from the content-addressed store, hash-verified

297 tool.dtsFiles.push({ target, source });
298 }
299 addSources(tool, sources) {
300 const files = tool.cFiles;
301 const folders = tool.cFolders;
302 sources.forEach(source => {
303 const parts = tool.splitPath(source);
304 const directory = parts.directory;
305 const target = parts.name + ".c.o";
306 if (!files.already[source]) {
307 files.already[source] = true;
308 files.push({ target, source });
309 }
310 if (!folders.already[directory]) {
311 folders.already[directory] = true;
312 folders.push(directory);
313 }
314 });
315 }
316 addXSFile(tool) {
317 const files = tool.cFiles;
318 const source = tool.xsPath + tool.slash + "sources" + tool.slash + "xsffi.c";

Callers 2

mcConfigMethod · 0.95
mcRunMethod · 0.95

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected