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

Function findNearestApp

src/apps/functions.js:14–26  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

12};
13
14function findNearestApp (dir) {
15 if (!dir) {
16 dir = process.cwd();
17 }
18
19 if (isDevkitApp(dir)) {
20 return dir;
21 } else if (fs.existsSync(path.join(dir, '..'))) {
22 return findNearestApp(path.normalize(path.join(dir, '..')));
23 } else {
24 return null;
25 }
26}
27
28function isDevkitApp (cwd) {
29 var manifestPath = path.join(cwd, 'manifest.json');

Callers 1

functions.jsFile · 0.85

Calls 1

isDevkitAppFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…