MCPcopy
hub / github.com/ternjs/tern / findProjectDir

Function findProjectDir

lib/bootstrap.js:8–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6var projectFileName = ".tern-project", portFileName = ".tern-port";
7
8function findProjectDir() {
9 var dir = process.cwd();
10 for (;;) {
11 try {
12 if (fs.statSync(path.resolve(dir, projectFileName)).isFile()) return dir;
13 } catch(e) {}
14 var shorter = path.dirname(dir);
15 if (shorter == dir) return null;
16 dir = shorter;
17 }
18}
19
20var defaultConfig = {
21 libs: [],

Callers 1

bootstrap.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…