MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / hasDependencies

Method hasDependencies

lib/models/project.js:112–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 // resolution algorithm). Now we just sample to see if we can
111 // resolve the first dependency or devDependency we find.
112 hasDependencies() {
113 if (this.cli.disableDependencyChecker) {
114 // Blueprint tests set this flag.
115 return true;
116 }
117
118 for (let depName in this.dependencies()) {
119 try {
120 this.resolveSync(`${depName}/package.json`);
121 return true;
122 } catch (err) {
123 if (err.code !== 'MODULE_NOT_FOUND') {
124 throw err;
125 }
126 return false;
127 }
128 }
129 return false;
130 }
131
132 static nullProject(ui, cli) {
133 if (NULL_PROJECT) {

Callers 1

validateAndRunFunction · 0.45

Calls 2

dependenciesMethod · 0.95
resolveSyncMethod · 0.95

Tested by

no test coverage detected