Powershell build - compiling SASS
You need a SASS compiler and your mileage may vary. The original compiler is written in Ruby, so, if you want to use that, you have to install Ruby, the SASS gem and invoke sass
from your Powershell script.
Another option is to use a compatible compiler like SassC or C6 which do not need the Ruby runtime.
I think my lack of experience with Powershell/build scripts in general had me overthinking this. I took the following steps:
1) Installed Ruby for Windows from here: https://www.ruby-lang.org/en/documentation/installation/
2) Open Command Prompt -> entered gem install ruby
3) Opened PowerGUI Script Editor (already installed, but can be downloaded here: http://software.dell.com/products/powergui-freeware/)
4) Created a function to execute the following: sass -t compressed "path\sassInput.scss" "path\sassOutput.css"
And presto. I do want to have a way of doing this for each .scss file in the directory that is not a partial, but this is enough to get me started for now.
UPDATE:
This is what I ended up with for a Powershell script: (note $dirpath
is set to my project's root directory elsewhere)
$stylesheetPath = $dirpath + "App_Themes\"
$files = Get-ChildItem $stylesheetPath -Filter *.scss
for ($i=0; $i -lt $files.Count; $i++) {
$file = $files[$i]
$fileName = $file.BaseName
$filePath = $file.FullName
if (-not $fileName.StartsWith("_")) {
$newFilePath = "$stylesheetPath$fileName.css"
sass -t compressed $filePath $newFilePath
}
}