asset-builder icon indicating copy to clipboard operation
asset-builder copied to clipboard

Bower CSS dependencies don't work for SCSS

Open konrad-ha opened this issue 10 years ago • 2 comments
trafficstars

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).

konrad-ha avatar Nov 17 '15 13:11 konrad-ha

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.

buhichan avatar Mar 31 '16 03:03 buhichan

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.

konrad-ha avatar Jul 26 '16 13:07 konrad-ha