Skip to content

Instantly share code, notes, and snippets.

@dimart
Created March 25, 2017 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimart/37ae7164c31e1e35126dc9ff801aa62f to your computer and use it in GitHub Desktop.
Save dimart/37ae7164c31e1e35126dc9ff801aa62f to your computer and use it in GitHub Desktop.
Monaco
diff --git a/build.sbt b/build.sbt
index 0af6612..90f2908 100644
--- a/build.sbt
+++ b/build.sbt
@@ -188,7 +188,7 @@ lazy val scastie = project
balancer,
instrumentation,
sbtRunner,
- codemirror,
+ monaco,
client,
runtimeDotty,
sbtScastie,
@@ -234,6 +234,23 @@ lazy val codemirror = project
)
.enablePlugins(ScalaJSPlugin)
+/* monaco is a facade to the the Monaco Editor, javascript editor that powers VS Code */
+lazy val monaco = project
+ .settings(baseSettings)
+ .settings(
+ jsDependencies ++= {
+ def monacoD(path: String): JSModuleID =
+ "org.webjars.npm" % "monaco-editor" % "0.8.3" % "compile" / s"$path.js" minified s"$path.js"
+
+ List(
+ monacoD("min/vs/loader"),
+ monacoD("min/vs/editor/editor.main").dependsOn("min/vs/loader.js").dependsOn("react-dom-server.js")
+ )
+ },
+ libraryDependencies += "org.scala-js" %%% "scalajs-dom" % scalajsDomVersion
+ )
+ .enablePlugins(ScalaJSPlugin)
+
def react(artifact: String,
name: String,
configuration: Configuration = Compile): JSModuleID =
@@ -276,7 +293,7 @@ lazy val client = project
jsEnv in Test := new PhantomJS2Env(scalaJSPhantomJSClassLoader.value)
)
.enablePlugins(ScalaJSPlugin, SbtWeb)
- .dependsOn(codemirror, api211JS)
+ .dependsOn(monaco, api211JS)
lazy val instrumentation = project
.settings(baseSettings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment