austinpray/asset-builder

Bower CSS dependencies don't work for SCSS

konrad-ha opened this issue · 2 comments

I am trying to get my head around the fact that Bower SCSS packages are not integrated into "*.css" dependencies. Currently the only workarounds seem to be using overrides in bower.json or adding the bower_components paths manually in manifest.json. Both options defeat the purpose of just installing Bower packages and having them automagically imported into your dependencies.

I am not entirely sure on how to best approach this, maybe with another option for dependencies specifying legal file-types or something similar. My first attempts at fixing this myself haven't worked, but the whole file selection process is still quite mysterious for me.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28316160-bower-css-dependencies-don-t-work-for-scss?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github).

It looks like the author thinks scss shouldn't be returned in "*.css" dependencies.

In my project, I have manifest.json like this:

...
main.css:{
     files:"main.css",
     bower:"bootstrap"
}
...

the main files of bootstrap(v4-dev) is bootstrap.scss. It cannot be intergrated into main.css unless the "files" in main.css include a sass which imports bootstrap.scss, which is how #roots/sage imports bootstrap-sass-official using asset-builder.

I worked around this using a gulp-wiredep taks on my main.css file. It's similar to how Sage does things and works nice enough.

It's still a shame that *.less and *.scss files aren't included in the *.css dependencies, it feels like a natural fit. At least having the option to include them would take a big headache out of including more modern CSS dependencies.