Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are managed css/less assets not processed by sbt-less plugin in Play 2.3?

I upgraded to play 2.3, and followed the instructions described in Using LESS CSS to use the less plugin. However, the less file is not being compiled to css and sent to target. The JS files however are working.

All I did was to add the less and jslint plugins as follows:

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")

File structure:

/assets
  /javascripts -> *.js files are linted and staged
  /stylesheets -> *.less files not working
like image 945
ferk86 Avatar asked Jun 14 '14 01:06

ferk86


1 Answers

Thanks! It fixed now.

  • Only when *.scala full build file is used. Add the following imports to the build:

    import com.typesafe.sbt.web.SbtWeb.autoImport._
    import com.typesafe.sbt.less.Import.LessKeys
    
  • Add the following to project settings:

    includeFilter in (Assets, LessKeys.less) := "*.less"
    
    // for minified *.min.css files
    LessKeys.compress := true
    
like image 170
ferk86 Avatar answered Sep 16 '22 13:09

ferk86