Home

Awesome

sbt-sass plugin for sbt(probably, didn't test) and Play Framework 2.3.x

Plugin based on play-sass

ver 0.1.9 [09 oct 2014]

ver 0.1.8 [08 oct 2014]

ver 0.1.7 [17 sep 2014]

Prerequisites

Sass compiler needs to be installed for plugin to work. This means that sass executable needs to be found in path. Sass can be installed by installing sass gem (minimal version 3.4.0).

gem install sass -v 3.4.0 

You can verify that sass has been installed by following command:

sass -v

Also you should install (opitonal) compass if you want to use it

gem install compass

Installation

External GitHub repository (Recommended)

  1. Add line to project/plugins.sbt
    resolvers += Resolver.url("GitHub repository", url("http://shaggyyeti.github.io/releases"))(Resolver.ivyStylePatterns)
    
    addSbtPlugin("default" % "sbt-sass" % "0.1.9")
    
  2. Run activator

Compilation from sources

  1. Clone from this repo
    git clone https://github.com/ShaggyYeti/sbt-sass.git
    
  2. Enter to folder with sbt-sass and run sbt
  3. In sbt-console execute command publishLocal
  4. Add line in your play project to project/plugins.sbt
    addSbtPlugin("default" % "sbt-sass" % "0.1.9")
    
  5. Run activator

Usage

<link rel="stylesheet" media="screen" href="@routes.Assets.at("test.css")">

Example of play-project in play-sass-example folder

Compass (optional)

If u want to use compass just add next line in build.sbt:

sassOptions in Assets ++= Seq("--compass", "-r", "compass")

Troubles and solutions