1
votes

I have set Grunt to run Compass which works nicely but I need stylesheets from my Bower components to be added to this.

What I have done is used the grunt contrib copy plugin to copy any .css files from my Bower components and place them in a temporary folder somewhere. I now need the Compass task to compile my sass and add the css from the files in the temporary directory to the end result.

Any ideas on how this could be accomplished?

1

1 Answers

0
votes

One way to achieve this would be by changing your Bower component stylesheets to being SASS partials. Like from, lets say,

"bower1.css" - "bower2.css" - "bower3.css"

to

"_bower1.scss" - "_bower2.scss" - "_bower3.scss"

and then just add these Partials to your SASS file by adding imports:

/* Add regular Styles here... */

@import '/my/temporary/directory/bower1';

@import '/my/temporary/directory/bower2';

@import '/my/temporary/directory/bower3';

Then just compile your SASS file. Now everything should be right there in your compiled CSS file.