quaertym / ember-cli-compass-compiler

Ember CLI Compass Compiler
MIT License
28 stars 23 forks source link

CompassCompiler error due to invalid Compass option #77

Open kaitohara opened 3 years ago

kaitohara commented 3 years ago

I am seeing the following error when building with ember-cli-compass-compiler after upgrading ember-cli recently. [CompassCompiler]Error: invalid option: --tree-type=styles

It looks like this is because Ember Cli 's Broccoli started to add a new option value treeType: 'styles' when packaging styles. (I believe in v3.26.0). ember-cli-compass-compiler passes this option into broccoli-compass-compiler, which generates the compass command.

Since compass does not need the new option treeType that is provided by ember-cli, would it be possible to omit/remove the field from compassOptions before it gets passed into compileCompass()?

To verify this is related to the error, I tried delete compassOptions.treeType before compileCompass(inputTrees, compassOptions) is called in index.js locally, and the app was built successfully.

quaertym commented 3 years ago

I will look into it. In the meantime, can you try setting treeType to undefined in compassOptions?

kaitohara commented 3 years ago

thank you! I did try setting treeType to undefined in compassOptions in new EmberApp(), but unfortunately the values get overwritten by inputOptions. I also tried some other workarounds like setting treeType as a read-only property, but it seems it has no impact on how the options merge() works.