[2.3.0] Migrating to sbt-less

238 views
Skip to first unread message

Ben McCann

unread,
May 29, 2014, 6:31:25 PM5/29/14
to play-fr...@googlegroups.com
The MigrationGuide says to specify the sbt-less entry point you use:

includeFilter in (Assets, LessKeys.less) := "foo.less" | "bar.less"

Do we have to have some imports for these to work?

    [error] /home/bmccann/src/example/project/Build.scala:118: not found: value Assets
    [error]       includeFilter in (Assets, LessKeys.less) := "main.less",
    [error]                         ^
    [error] one error found
    [error] (compile:compile) Compilation failed

Thanks,
Ben

Peter Vlugter

unread,
May 29, 2014, 9:39:21 PM5/29/14
to play-framework
I see there's a note under building with scala here:

http://www.playframework.com/documentation/2.3.x/Build

Yes, for .scala builds you need some imports. For .sbt builds the imports are automatic.

To get the same imports as .sbt you'll need:

import com.typesafe.sbt.web.SbtWeb.autoImport._
import com.typesafe.sbt.less.SbtLess.autoImport._

The sbt web plugins all follow the same naming conventions.

Or alternatively, the autoImports refer to the Import objects and you can use those directly:

import com.typesafe.sbt.web.Import._
import com.typesafe.sbt.less.Import._

- Peter
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ben McCann

unread,
May 30, 2014, 2:06:14 PM5/30/14
to play-fr...@googlegroups.com
Thanks Peter! That's super helpful.

-Ben



You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/ttaBCghQwnA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages