* 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)
| 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 |
no test coverage detected