Generates a tree for the specified path @private @method treeGenerator @return {tree}
(dir)
| 522 | @return {tree} |
| 523 | */ |
| 524 | treeGenerator(dir) { |
| 525 | let tree; |
| 526 | |
| 527 | if (!this.project) { |
| 528 | throw new SilentError( |
| 529 | `Addon \`${this.name}\` is missing \`addon.project\`. This may be the result of an addon forgetting to invoke \`super\` in its init hook.` |
| 530 | ); |
| 531 | } |
| 532 | // TODO: fix law of demeter `_watchmanInfo.canNestRoots` is obviously a poor idea |
| 533 | if ((this.project && this.project._watchmanInfo.canNestRoots) || this.isDevelopingAddon()) { |
| 534 | const WatchedDir = require('broccoli-source').WatchedDir; |
| 535 | tree = new WatchedDir(dir); |
| 536 | } else { |
| 537 | const UnwatchedDir = require('broccoli-source').UnwatchedDir; |
| 538 | tree = new UnwatchedDir(dir); |
| 539 | } |
| 540 | |
| 541 | return tree; |
| 542 | }, |
| 543 | |
| 544 | _treePathFor(treeName) { |
| 545 | let treePath = this.treePaths[treeName]; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…