play-sass
play-sass copied to clipboard
play 2.3 - sass 0.4.0 - not found: value sassOptions
import net.litola.SassPlugin
......
lazy val main = Project(
appName, file(".")
).enablePlugins(play.PlayJava, net.litola.SassPlugin).settings(
resolvers += Resolver.sonatypeRepo("releases"),
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/repo")),
resolvers += Resolver.url("typesafe-releases", url("http://repo.typesafe.com/typesafe/maven-releases")),
resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns),
resolvers += "ReactiveCouchbase" at "https://raw.github.com/ReactiveCouchbase/repository/master/snapshots",
resolvers += Resolver.sonatypeRepo("snapshots"),
scalaVersion := "2.11.1",
sassOptions := Seq("--compass"),
libraryDependencies ++= appDependencies
)
[info] Loading project definition from /Users/kirill-laptop/workspace/explain-project-git/project [error] /Users/kirill-laptop/workspace/explain-project-git/project/Build.scala:53: not found: value sassOptions [error] sassOptions := Seq("--compass"), [error] ^ [error] one error found error Compilation failed
Doesn't work for me :(
Hi,
I have a different error with a similar build.sbt:
import play.PlayJava .... Keys.fork in (Test) := false
lazy val root = (project in file(".")).enablePlugins(PlayJava, net.litola.SassPlugin).settings( sassOptions := Seq("--sourcemap=none", "--style", "compact", "--compass", "-scss" ) )
scalaVersion := "2.11.1"
libraryDependencies ++= Seq( javaJdbc, cache, javaWs )
which throws:
error @6kgip0kg9: Compilation error in C:\CC_Work\KatzH_cx_view\CPRR_II_SRC\cx\app\assets\stylesheets\application.scss:0 [error] application -
! @6kgip0kg9 - Internal server error, for (GET) [/] ->
play.PlayExceptions$AssetCompilationException: Compilation error[Sass compiler: ruby.exe: No such file or directory -- C:/CC_Work/KatzH_cx_view/CPRR_II_SRC/cx/sass (LoadError)] at net.litola.SassCompiler$.compile(SassCompiler.scala:28) ~[na:na] at net.litola.SassPlugin$autoImport$$anonfun$3.apply(SassPlugin.scala:24) ~[na:na] at net.litola.SassPlugin$autoImport$$anonfun$3.apply(SassPlugin.scala:24) ~[na:na] at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.liftedTree1$1(PlayAssetsComp iler.scala:56) ~[na:na] at play.PlayAssetsCompiler$$anonfun$AssetsCompiler$1$$anonfun$3.apply(PlayAssetsCompiler.sca la:55) ~[na:na] [success] Compiled in 254ms
From debugging the scala code in Idea 14, I have determined that I can invoke the same command from the workspace and obtain the correct css mapping:
sass.bat -l -I C:\CC_Work\KatzH_cx_view\CPRR_II_SRC\cx\app\assets\stylesheets --sourcemap=none --style compact --compass --scss c:\CC_Work\KatzH_cx_view\CPRR_II_SRC\cx\app\assets\stylesheets\application.scss c:\Temp\application.css
ruby/sass and compass are all in my path in windows.
The config.rb is in C:/CC_Work/KatzH_cx_view/CPRR_II_SRC/cx and specifies the following:
http_path = "/" css_dir = "public/stylesheets" sass_dir = "app/assets/stylesheets/app" images_dir = "public" javascripts_dir = "public" fonts_dir = "public"
and again from debugging the scala components, unclear why sass' underlying Ruby is looking for a SASS directory in the wrong location when sass_dir is clearly specified. Any debugging suggestions?
Thanks, Henry
Solution was jumping ship:
https://github.com/ShaggyYeti/sbt-sass
Thanks nanothermite - Shaggy's fork is working well for me