jlitola / play-sass

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

Play 2.1 setup #10

Closed larvanitis closed 10 years ago

larvanitis commented 11 years ago

In Play 2.1.0's Build.scala I had to set the settings like

val main = play.Project(appName, appVersion, appDependencies).settings(
  // ...
  SassPlugin.sassSettings(0),
  SassPlugin.sassOptions := Seq("--compass","-r", "compass", "-r", "zurb-foundation"),
  SassPlugin.sassSettings(2)
)

(sassOptions specific to my setup but you get the point) since SassPlugin.sassSettings:_* doesn't work. Is there any more elegant way of doing that?

You might also want to update the README.

danielberndt commented 11 years ago

thank you so much for your hint, it would have taken me a very long time to find that out on my own! Would be nice to see a more elegant way indeed

larvanitis commented 11 years ago

Another, more compact way would be

val main = play.Project(appName, appVersion, appDependencies).settings(
  // ... <- unrelated project settings
).settings( SassPlugin.sassSettings: _* ) // <- import default play-sass settings
.settings( SassPlugin.sassOptions := Seq("--compass","-r", "compass", "-r", "zurb-foundation") )
// ^- optionally override/add your own

If I'm not mistaken each chained settings call adds more options

larvanitis commented 11 years ago

Do you have sass in your PATH? What does running sass -v in a terminal return? After compiling your project are there any css files under target/scala-2.X/resource_managed/main/public/ Inside play/sbt console does running play-sass-entry-points list your scss files and play-sass-options any options you might have set?

On Thu, Mar 14, 2013 at 5:32 AM, ACenterA notifications@github.com wrote:

Any idea why even with all of that I get..

:9000/assets/stylesheets/test.scss Request Method:GET Status Code:404 Not Found

Can anyone put a "Sample Empty project" with scss files that gets generated ?

— Reply to this email directly or view it on GitHubhttps://github.com/jlitola/play-sass/issues/10#issuecomment-14884935 .

jlitola commented 10 years ago

I updated README to show how to customize command line arguments.

play.Project.playScalaSettings ++ SassPlugin.sassSettings ++ Seq(SassPlugin.sassOptions := Seq("--compass", "-r", "compass"))