jlitola / play-sass

Sass asset handling for Play Framework 2.0 *DEPRECATED*
MIT License
90 stars 28 forks source link

Question: How do I set sass options? #4

Closed syfl closed 11 years ago

syfl commented 11 years ago

Thanks for the plugin! I am fairly new to scala and play 2 so I apologize if there is an obvious answer to the following questions:

How to I set additional options for the sass compiler?

I tried the following but the options don't seem to get picked up by the compiler

import net.litola.SassPlugin
import net.litola.SassPlugin._

object ApplicationBuild extends Build {

val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
      // Add your own project settings here
           sassOptions := Seq("--compass","-r", "zurb-foundation")
    )

I would appreciate any hint.

Thanks for your effort! cheers syfl

syfl commented 11 years ago

I got it working by adding

net.litola.SassPlugin.sassOptions := Seq("--compass","-r", "zurb-foundation")

to the build.sbt file. Closing this issues then. Anyhow, I would love to know if this is the right way to do it :)

ndeverge commented 11 years ago

@syfl I got it working using:

import net.litola.SassPlugin

object ApplicationBuild extends Build {
...

  val main = play.Project(appName, appVersion, appDependencies).settings(
        SassPlugin.sassOptions := Seq("--compass","-r", "zurb-foundation"),
        SassPlugin.sassEntryPoints <<= (sourceDirectory in Compile)(base => ((base / "assets" ** "*.sass") +++ (base / "assets" ** "*.scss") --- base / "assets" ** "_*")), 
        resourceGenerators in Compile <+= SassPlugin.sassWatcher
  )
}

Under Play 2.1.0