From dc074512f5f3faf140beca2b42713c1100cafb28 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Mon, 24 Feb 2014 01:10:07 -0800 Subject: move to build.sbt --- Plugin.scala | 2 ++ build.sbt | 23 +++++++++++++++++++++++ project/Build.scala | 27 --------------------------- 3 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 build.sbt delete mode 100644 project/Build.scala diff --git a/Plugin.scala b/Plugin.scala index d6cea03..8f09c11 100644 --- a/Plugin.scala +++ b/Plugin.scala @@ -28,6 +28,7 @@ object Plugin extends sbt.Plugin { val server = settingKey[ActorRef]("local websocket server") val fileName = settingKey[String]("name of the generated javascript file") val bootSnippet = settingKey[String]("piece of javascript to make things happen") + implicit val system = ActorSystem( "SystemLol", config = ConfigFactory.load(ActorSystem.getClass.getClassLoader), @@ -107,6 +108,7 @@ object Plugin extends sbt.Plugin { if (req.headers.contains(Connection("Upgrade"))){ sender ! Sockets.UpgradeServer(Sockets.acceptAllFunction(req), self) }else{ + req. sender ! HttpResponse( StatusCodes.OK, entity="i am a cow" diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..c786633 --- /dev/null +++ b/build.sbt @@ -0,0 +1,23 @@ +import sbt.Keys._ + +lazy val root = project.dependsOn(uri("git://github.com/lihaoyi/SprayWebSockets.git")) + +name := "scala-js-workbench" + +version := "0.1-SNAPSHOT" + +organization := "com.lihaoyi.workbench" + +sbtPlugin := true + +(resources in Compile) := {(resources in Compile).value ++ (baseDirectory.value * "*.ts").get} + +resolvers += "spray repo" at "http://repo.spray.io" + +resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/" + +libraryDependencies ++= Seq( + "io.spray" % "spray-can" % "1.2.0", + "com.typesafe.akka" %% "akka-actor" % "2.2.3", + "com.typesafe.play" %% "play-json" % "2.2.0-RC1" +) diff --git a/project/Build.scala b/project/Build.scala deleted file mode 100644 index e4227cd..0000000 --- a/project/Build.scala +++ /dev/null @@ -1,27 +0,0 @@ -import sbt._ -import Keys._ - - -object Build extends sbt.Build { - import sbt._ - - override lazy val projects = Seq(root) - lazy val root = - Project("scala-js-workbench", file(".")) - .dependsOn(uri("git://github.com/lihaoyi/SprayWebSockets.git")) - .settings( - name := "scala-js-workbench", - version := "0.1-SNAPSHOT", - - organization := "com.lihaoyi.workbench", - sbtPlugin := true, - (resources in Compile) := {(resources in Compile).value ++ (baseDirectory.value * "*.ts").get}, - resolvers += "spray repo" at "http://repo.spray.io", - resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/", - libraryDependencies ++= Seq( - "io.spray" % "spray-can" % "1.2-RC3", - "com.typesafe.akka" %% "akka-actor" % "2.2.3", - "com.typesafe.play" %% "play-json" % "2.2.0-RC1" - ) - ) -} -- cgit v1.2.3