Change from LESS to SASS/SCSS

Another optional change when using SCORE 2.0 is that you might choose to move from LESS to SASS for your styling pre-processor.

To use SASS, you must first install a SASS compiler into your machine that can be executed during the build phase of your project.

We recommend you install the Ruby for Windows Installer available at http://rubyinstaller.org 

With Ruby installed, you can install the SASS compiler using gem - instructions can be found at http://sass-lang.com/install

Next, you will need the SASS source files from the BrainJocks SCORE 2.0 solution template.  You can download the SASS source

 

Add them into the MVC area in your web project into a folder called "sass".

Finally, you will need to add the compilation of the SASS into your Web csproj file and you will have to remove the LESS compilation statements.

  <!-- Comment out LESS compilation
  <Target Name="CompileLess" AfterTargets="Build">
    <Exec Command="lessc Areas\MySite\less\main.less Areas\MySite\css\main.css" IgnoreExitCode="false" />
    <Exec Command="lessc Areas\MySite\less\page_editor.less Areas\MySite\css\page_editor.css" IgnoreExitCode="false" />
  </Target>
  -->

  <Target Name="CompileSass" AfterTargets="Build">
    <Exec Command="sass Areas\MySite\scss\_main.scss Areas\MySite\css\main.css  --scss --sourcemap=auto" IgnoreExitCode="false" />
    <Exec Command="sass Areas\MySite\scss\_page_editor.scss Areas\MySite\css\page_editor.css --scss --sourcemap=auto" IgnoreExitCode="false" />
  </Target>