Allows to mark the addon as developing, triggering live-reload in the project the addon is linked to. #### Uses: - Working on projects with internal addons @public @method isDevelopingAddon @return {Boolean}
()
| 382 | @return {Boolean} |
| 383 | */ |
| 384 | isDevelopingAddon() { |
| 385 | if (process.env.EMBER_ADDON_ENV === 'development' && this.parent instanceof Project) { |
| 386 | const parentName = this.parent.name(); |
| 387 | // If the name in package.json and index.js match, we're definitely developing |
| 388 | if (parentName === this.name) { |
| 389 | return true; |
| 390 | } |
| 391 | |
| 392 | // Addon names in index.js and package.json must be the same at all times whether they have scope or not. |
| 393 | if (this.root === this.parent.root) { |
| 394 | if (parentName !== this.name) { |
| 395 | let pathToDisplay = process.cwd() === this.root ? process.cwd() : path.relative(process.cwd(), this.root); |
| 396 | |
| 397 | throw new SilentError( |
| 398 | 'ember-cli: Your names in package.json and index.js must match. ' + |
| 399 | `The addon in ${pathToDisplay} currently has '${parentName}' in package.json and '${this.name}' in index.js.` |
| 400 | ); |
| 401 | } |
| 402 | |
| 403 | return true; |
| 404 | } |
| 405 | } |
| 406 | return false; |
| 407 | }, |
| 408 | |
| 409 | /** |
| 410 | * Discovers all child addons of this addon and an AddonInfo about |
nothing calls this directly
no test coverage detected
searching dependent graphs…