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

Method loadAddon

lib/models/package-info-cache/index.js:246–260  ·  view source on GitHub ↗

* Do the actual processing of the root directory of an addon, when the addon * object already exists (i.e. the addon is acting as the root object of a * tree, like project does). We need the object in order to find the internal addons. * _readPackage takes care of the general processing of

(addonInstance)

Source from the content-addressed store, hash-verified

244 * No copy is made.
245 */
246 loadAddon(addonInstance) {
247 // to maintain backwards compatibility for consumers who create a new instance
248 // of the base addon model class directly and don't set `packageRoot`
249 let pkgInfo = this._readPackage(addonInstance.packageRoot || addonInstance.root, addonInstance.pkg);
250
251 // NOTE: the returned pkgInfo may contain errors, or may contain
252 // other packages that have errors. We will try to process
253 // things anyway.
254 if (!pkgInfo.processed) {
255 pkgInfo.addon = addonInstance;
256 this._resolveDependencies();
257 }
258
259 return pkgInfo;
260 }
261
262 /**
263 * Resolve the node_module dependencies across all packages after they have

Callers 1

initFunction · 0.80

Calls 2

_readPackageMethod · 0.95
_resolveDependenciesMethod · 0.95

Tested by

no test coverage detected