MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / treeGenerator

Function treeGenerator

lib/models/addon.js:524–542  ·  view source on GitHub ↗

Generates a tree for the specified path @private @method treeGenerator @return {tree}

(dir)

Source from the content-addressed store, hash-verified

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];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…