jasonmit / ember-myth

Myth preprocessor Ember CLI addon
MIT License
4 stars 2 forks source link

How to use myth to preprocess vendor css #2

Open patrickberkeley opened 9 years ago

patrickberkeley commented 9 years ago

Can you provide and example of how to run vendor css files through myth with this addon please?

For example if I install https://github.com/suitcss/suit with bower I have a bunch of css files that need to be run through a preprocessor that handles css variables, math, etc.

"bower_components/suit-base/lib/base.css";
"bower_components/suit-components-arrange/lib/arrange.css";
"bower_components/suit-components-button/lib/button.css";
...more

How do I preprocess them and add them to the tree?

jasonmit commented 9 years ago

Sorry for the delayed response, must have missed the notification.

I am guessing you want to also control where these are outputted to, or do you want to have one app.css and import these files in?

patrickberkeley commented 9 years ago

I was going for the latter: Using CSS imports in app/styles/app.css to import from bower components as follows:

@import "bower_components/suit-base/lib/base.css";
@import "bower_components/suit-components-arrange/lib/arrange.css";
@import "bower_components/suit-components-button/lib/button.css";

But IIRC the imports are not run through myth.

jasonmit commented 9 years ago

It has to be relative to your inputFile: app/styles/app.css

@import "../../bower_components/suit-base/lib/base.css";
@import "../../bower_components/suit-components-arrange/lib/arrange.css";
@import "../../bower_components/suit-components-button/lib/button.css";
jasonmit commented 9 years ago

https://github.com/segmentio/myth/issues/135

jasonmit commented 9 years ago

Reopening, as the proposal to add paths and passing it on to the importer parser is a go.