I am searching for a solution for compiling my .scss files at run-time and at compile-time.
The reason I need both is that our designers work on Macs and prefer the ease of having their .scss files compiled dynamically at run-time (especially during a development phase). On the other hand, I need compile-time support to validate that the SCSS compiles successfully during my build process. My goal is to fail a build if the SCSS doesn't compile.
I have found several libraries available on NuGet, however, minor flaws in each of them are holding me back.
Is there a solution available for both of these scenarios?
Here's where my research has led me:
Run-time Support
Compile-time support:
The Pro edition of the Mindscape Web Workbench includes a command-line tool for compiling at runtime. Currently, only the nightly build is capable of compiling Bourbon and Neat (one of my requirements).
Here is my pre-build event which is working great at the moment:
"C:\Program Files (x86)\Mindscape\Web Workbench\Command Line\wwcmd.exe"
"$(ProjectDir)scss\style.scss" /o:../css /style:compressed
UPDATE:
We decided to simply call SASS from a pre-build event as opposed to using Web Workbench.
call sass -C "$(ProjectDir)assets\scss\main.scss" "$(ProjectDir)assets\css\compiled\main.css" --style compressed
Check out SassAndCoffee. It's what Cassette is using and it embeds everything into a few assemblies.
Web Workbench on the other hand actually installs ruby and the sass gems to the file system in a very long folder path hidden beneath the current users directory, which is likely to be troublesome for a web application and with respect to security and permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With