Skip to content

Commit e0fdc6b

Browse files
committed
Updated for Play 2.2.
1 parent 8981312 commit e0fdc6b

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# play-lessc
2-
This [sbt][sbt] plugin for [Play 2.1.x][play] provides the ability to use command line tools to compile less through Node instead of Rhino.
2+
This [sbt][sbt] plugin for [Play][play] provides the ability to use command line tools to compile less through Node instead of Rhino.
33

44
# Prerequisites
55
This plugin requires lessc - [Less][less] command line program - which can be installed through Node.js and npm:
@@ -13,14 +13,14 @@ Locally:
1313
npm install less
1414

1515
# Installation
16-
Add the resolver and sbt plugin to your `project/pugins.sbt` file:
16+
Add the resolver and sbt plugin to your `project/plugins.sbt` file:
1717

1818
resolvers += "JMParsons Releases" at "http://jmparsons.github.io/releases/"
1919

20-
addSbtPlugin("com.jmparsons" % "play-lessc" % "0.1.0")
20+
addSbtPlugin("com.jmparsons" % "play-lessc" % "0.1.1")
2121

2222
# Usage
23-
Import the plugin file into your Build.scala to override settings:
23+
Import the plugin file into your build file to override settings:
2424

2525
import com.jmparsons.plugin.LesscPlugin._
2626

@@ -30,6 +30,16 @@ Set the default `lessEntryPoints` to `Nil` and put in your custom ones into less
3030
(base / "app" / "assets" / "stylesheets" * "*.less")
3131
)
3232

33+
build.sbt example:
34+
35+
play.Project.playScalaSettings ++ lesscSettings
36+
37+
lessEntryPoints := Nil
38+
39+
lesscEntryPoints in Compile <<= baseDirectory(customLessEntryPoints)
40+
41+
Build.scala example:
42+
3343
lazy val main = play.Project(appName, appVersion, mainDeps).settings(lesscSettings: _*).settings(
3444
lessEntryPoints := Nil,
3545
lesscEntryPoints in Compile <<= baseDirectory(customLessEntryPoints)
@@ -49,6 +59,10 @@ A directory value is required for a non global copy of lessc (trailing slash opt
4959

5060
## Changelog
5161

62+
0.1.1 - October 4, 2013
63+
64+
- Updated to work with Play 2.2.x.
65+
5266
0.1.0 - September 2, 2013
5367

5468
- Windows works now with a global or local copy of lessc using lessc.cmd as a fallback.

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name := "play-lessc"
22

3-
version := "0.1.0"
3+
version := "0.1.1"
44

55
sbtPlugin := true
66

77
organization := "com.jmparsons"
88

99
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
1010

11-
addSbtPlugin("play" % "sbt-plugin" % "2.1.3")
11+
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")
1212

1313
publishTo := Some(Resolver.file("file", new File( "/tmp/play-lessc" )))

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.12.2
1+
sbt.version=0.13.0

src/main/scala/com/jmparsons/plugin/LesscCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.jmparsons.plugin
22

3-
import sbt.PlayExceptions.AssetCompilationException
3+
import play.PlayExceptions.AssetCompilationException
44
import sbt.SettingKey
55
import java.io.File
66
import scala.sys.process._

src/main/scala/com/jmparsons/plugin/LesscPlugin.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.jmparsons.plugin
33
import sbt._
44
import sbt.Keys._
55
import play.Project._
6-
import scala.sys.process._
76

87
object LesscPlugin extends Plugin {
98

0 commit comments

Comments
 (0)