MCPcopy Create free account
hub / github.com/play-co/devkit / addModuleToApp

Function addModuleToApp

src/install/index.js:254–263  ·  view source on GitHub ↗

* Add module to app's `./modules` folder. Default action is to copy. If * opts.link is truthy, create a symlink instead. * * @return {Promise}

(app, cacheEntry, moduleName, opts)

Source from the content-addressed store, hash-verified

252 */
253
254function addModuleToApp (app, cacheEntry, moduleName, opts) {
255 trace('addModuleToApp cacheEntry:', cacheEntry);
256 moduleName = cacheEntry && cacheEntry.name || moduleName;
257
258 if (opts.link) {
259 return linkModuleIntoApp(app, cacheEntry);
260 } else {
261 return copyModuleIntoApp(app, cacheEntry);
262 }
263}
264
265/**
266 * The module installation for this app is a symlink. Remind the user :)

Callers 1

installModuleFromURLFunction · 0.85

Calls 2

linkModuleIntoAppFunction · 0.85
copyModuleIntoAppFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…