Skip to content

Commit

Permalink
fix(engines): enable flexi to better work in nested engines
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed May 11, 2016
1 parent edc4289 commit 302ac7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ module.exports = {
this._super.included.apply(this, arguments);

// see: https://github.com/ember-cli/ember-cli/issues/3718
if (typeof app.import !== 'function' && app.app) {
while (typeof app.import !== 'function' && app.app) {
app = app.app;
}

if (typeof app.import !== 'function') {
throw new Error('Flexi is being used within another addon or engine and is' +
' having trouble registering itself to the parent application.');
}

var pathBase = this.project.addonPackages.flexi.path;
compileScssVariables(path.join(pathBase, 'addon/styles'), this.flexiConfig());

Expand Down

0 comments on commit 302ac7c

Please sign in to comment.