summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorlihaoyi <haoyi.sg@gmail.com>2013-10-27 23:45:09 -0700
committerlihaoyi <haoyi.sg@gmail.com>2013-10-27 23:45:09 -0700
commit680216d364b760e0f41c25c4f69fc061150a0341 (patch)
tree77f90f75097fb0297c4a00ce0dd65ffe3a84f7a2 /runtime
downloadworkbench-680216d364b760e0f41c25c4f69fc061150a0341.tar.gz
workbench-680216d364b760e0f41c25c4f69fc061150a0341.tar.bz2
workbench-680216d364b760e0f41c25c4f69fc061150a0341.zip
first commit
Diffstat (limited to 'runtime')
-rw-r--r--runtime/project/Build.scala11
-rw-r--r--runtime/project/build.properties1
-rw-r--r--runtime/project/build.sbt5
-rw-r--r--runtime/src/main/scala/scala/js/Resources.scala12
4 files changed, 29 insertions, 0 deletions
diff --git a/runtime/project/Build.scala b/runtime/project/Build.scala
new file mode 100644
index 0000000..b7d4ecc
--- /dev/null
+++ b/runtime/project/Build.scala
@@ -0,0 +1,11 @@
+import sbt._
+import Keys._
+import ch.epfl.lamp.sbtscalajs.ScalaJSPlugin._
+import ScalaJSKeys._
+
+object Build extends sbt.Build {
+ lazy val resource =
+ project.in(file("."))
+ .settings(scalaJSSettings: _*)
+ .settings(name := "resources")
+} \ No newline at end of file
diff --git a/runtime/project/build.properties b/runtime/project/build.properties
new file mode 100644
index 0000000..1ebc8a2
--- /dev/null
+++ b/runtime/project/build.properties
@@ -0,0 +1 @@
+ sbt.version=0.13.0
diff --git a/runtime/project/build.sbt b/runtime/project/build.sbt
new file mode 100644
index 0000000..3407493
--- /dev/null
+++ b/runtime/project/build.sbt
@@ -0,0 +1,5 @@
+addSbtPlugin("ch.epfl.lamp" % "scalajs-sbt-plugin" % "0.1-SNAPSHOT")
+
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
+
+
diff --git a/runtime/src/main/scala/scala/js/Resources.scala b/runtime/src/main/scala/scala/js/Resources.scala
new file mode 100644
index 0000000..7bf344c
--- /dev/null
+++ b/runtime/src/main/scala/scala/js/Resources.scala
@@ -0,0 +1,12 @@
+package scala.js
+
+
+object Resource {
+ def apply(path: String) = {
+ Dynamic.global.ScalaJS.resources(path)
+ }
+}
+
+class Resource(base64: String){
+ lazy val string = Dynamic.global.atob(base64)
+} \ No newline at end of file