adopted-ember-addons / ember-cli-sass

Use node-sass to preprocess your ember-cli app's files, with support for sourceMaps and include paths
MIT License
274 stars 91 forks source link

Check host app, then parent, then app for options. #217

Open GCheung55 opened 4 years ago

GCheung55 commented 4 years ago

In an in-repo-engine, options are skipped due to the order of how the options are checked. Reverse them so host app options are checked first, then parent options, then app options.

Should address https://github.com/adopted-ember-addons/ember-cli-sass/issues/182#issuecomment-634967024

GCheung55 commented 4 years ago

@rwjblue any guidance to get this PR approved/merged?

GCheung55 commented 4 years ago

Could you help me understand what parent, app, and hostApp would refer to?

From the docs:

parent

This addon's parent.

If the addon is a direct dependency of an application, then parent will be the corresponding project instance. If it's a dependency of another addon, then parent will be a reference to that addon.

app

The host app instance.

Note: this property will only be present on addons that are a direct dependency of the application itself, not of other addons. It is also not available in init(), but will be set before setupPreprocessorRegistry() and included() are invoked.

hostApp comes from tihs._findHost method

This method climbs up the hierarchy of addons up to the host application.

I'm unsure, but if the addon is in an in-repo-engine then I assume that:

I'll put together a repo I can share to produce/test this.

GCheung55 commented 4 years ago

@rwjblue Here's the repo to reproduce the issue: https://github.com/GCheung55/ember-sass-test-repo.

Side note, I had to install node-sass instead of using sass (Dart version) because some imports weren't working.

GCheung55 commented 3 years ago

@rwjblue just following up on this in case you've missed it.

GCheung55 commented 2 years ago

@rwjblue Ping - just following up on this since I'm going through an upgrading round again that will likely be blocked by this issue.

tehhowch commented 1 year ago

any updates on this?