ember-cli-babel
Version:
Ember CLI addon for Babel
15 lines (11 loc) • 354 B
JavaScript
module.exports = function findApp(addon) {
let current = addon;
let app;
// Keep iterating upward until we don't have a grandparent.
// Has to do this grandparent check because at some point we hit the project.
do {
app = current.app || app;
} while (current.parent.parent && (current = current.parent));
return app;
}
;