Permalink
Browse files

compiles with Scala 2.10.0, not tested

  • Loading branch information...
1 parent 0683008 commit 46e7e8c68e44594c61a76f1b72af1b19c91a9050 @harrah committed Jan 7, 2013
Showing with 8 additions and 10 deletions.
  1. +5 −7 project/XRay.scala
  2. +2 −2 src/main/scala/LinkMap.scala
  3. +1 −1 src/main/scala/Styler.scala
View
@@ -5,18 +5,16 @@ object XRay extends Build
{
lazy val main = Project("sxr", file(".")) settings(
name := "sxr",
- organization := "org.scala-tools.sxr",
- version := "0.2.8-SNAPSHOT",
- scalaVersion := "2.9.0-1",
- crossScalaVersions += "2.8.1",
+ organization := "org.scala-sbt.sxr",
+ version := "0.3.0-SNAPSHOT",
+ scalaVersion := "2.10.0",
+ crossScalaVersions ++= Seq("2.9.2"),
ivyConfigurations += js,
libraryDependencies ++= dependencies,
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "provided"),
jqueryAll <<= target(_ / "jquery-all.js"),
combineJs <<= combineJquery,
- resourceGenerators in Compile <+= combineJs.identity,
- credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
- publishTo := Some( "Scala Tools Nexus" at "http://nexus.scala-tools.org/content/repositories/releases/" )
+ resourceGenerators in Compile <+= combineJs.identity
)
val js = config("js") hide
@@ -26,7 +26,7 @@ class CompoundLinkMap(write: LinkMap, readOnly: List[LinkMap]) extends LinkMap
def all = write :: readOnly
def update(src: String, stableID: String, id: Int) = write.update(src, stableID, id)
def clear(srcs: Iterable[String]) = write.clear(srcs)
- def apply(stable: String) = all.flatMap{ _(stable) }.firstOption
+ def apply(stable: String) = all.flatMap{ _(stable) }.headOption
def get = all.flatMap(_.get)
}
class BasicLinkMap(base: Option[URL]) extends LinkMap
@@ -44,7 +44,7 @@ class BasicLinkMap(base: Option[URL]) extends LinkMap
def clear(srcs: Iterable[String]): Unit = map --= srcs
def get: Iterable[(String, Iterable[(String, Int)])] = map
def apply(stable: String): Option[(String, Int)] =
- map.flatMap{ case (src, m) => m.get(stable).map(x => (source(src), x)) }.toSeq.firstOption
+ map.flatMap{ case (src, m) => m.get(stable).map(x => (source(src), x)) }.toSeq.headOption
def source(src: String) =
base match { case Some(url) => new URL(url, src) toExternalForm; case None => src }
}
@@ -65,7 +65,7 @@ private class BasicStyler(title: String, baseStyle: String, baseJs: String, base
val definitionsList = definitions.toList
val attributes = reference.map("href=\"" + constructHtmlLink(_) + "\"").toList :::
token.tpe.map(t => "title=\"" + Escape(t.name) + "\"").toList :::
- definitionsList.firstOption.map("id=\"" + _ + "\"").toList :::
+ definitionsList.headOption.map("id=\"" + _ + "\"").toList :::
( styleClasses match
{
case Nil => Nil

0 comments on commit 46e7e8c

Please sign in to comment.