Commit 6810c2fe authored by Mathieu's avatar Mathieu
Browse files

Fix js in site except hljs

parent 3d85ce54
Pipeline #623 failed with stage
in 4 minutes and 12 seconds
......@@ -198,8 +198,8 @@ lazy val scalaTags = OsgiProject(dir, "com.scalatags", exports = Seq("scalatags.
lazy val scalatexSite =
OsgiProject(dir, "com.lihaoyi.scalatex-site", exports = Seq("scalatex.*", "ammonite.*", "fastparse.*"), privatePackages = Seq("META-INF.**", "pprint.*", "scalaj.*", "scalaparse.*", "geny.*"), imports = Seq("*")) settings (
libraryDependencies += "org.openmole" %% "scalatex-site" % "0.4.5",
version := "0.4.5") settings(settings: _*)
libraryDependencies += "org.openmole" %% "scalatex-site" % "0.4.6",
version := "0.4.6") settings(settings: _*)
lazy val boopickle = OsgiProject(dir, "boopickle", exports = Seq("boopickle.*"), imports = Seq("*")) settings(
libraryDependencies ++= Seq("io.suzaku" %% "boopickle" % scalaBoopickleVersion),
......
......@@ -4,7 +4,7 @@ import org.scalajs.dom._
import org.scalajs.dom.raw.HTMLElement
import scala.util.{ Failure, Success }
import scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow
import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue
import scalatags.JsDom.all._
import rx._
......
package org.openmole.site
import com.karasiq.highlightjs.HighlightJS
import scaladget.highlightjs.HighlightJS
import scala.scalajs.js
import js.Dynamic.{ literal lit }
......@@ -32,7 +32,7 @@ object Highlighting {
"contains" js.Array("NAME")
)
def openmoleGrammar(highlightJS: HighlightJS) = lit(
def openmoleGrammar() = lit(
"keywords" lit(
"literal" js.RegExp("true false null"),
"keyword" js.RegExp("type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit")
......
package org.openmole.site
import scala.scalajs.js.JSApp
import scala.scalajs.js.annotation._
import scalatags.JsDom.all._
import rx._
......@@ -26,11 +25,11 @@ import scala.scalajs.js
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@JSExportTopLevel("site.SiteJS")
object SiteJS extends JSApp {
@JSExportTopLevel("SiteJS")
object SiteJS {
@JSExport()
def main(): Unit = {
@JSExport
def main(args: Array[String]): Unit = {
Highlighting.init
div.render
}
......
......@@ -150,7 +150,7 @@ object Site extends App {
}
private def onLoadString(sitepage: org.openmole.site.PageTree) = {
def siteJS = "org.openmole.site.SiteJS()"
def siteJS = "SiteJS"
def commonJS = s"$siteJS.main();$siteJS.loadIndex(index);"
......
......@@ -886,7 +886,7 @@ lazy val site = crossProject(JSPlatform, JVMPlatform).in(binDir / "org.openmole.
Libraries.lunr,
Libraries.scaladgetTools,
Libraries.scalajsDomJS,
Libraries.scalajsMarked
Libraries.highlightJS
)
lazy val siteJS = site.js enablePlugins (ExecNpmPlugin) settings (test := {})
......
......@@ -44,11 +44,9 @@ object Libraries {
lazy val autowireJS = libraryDependencies += "com.lihaoyi" %%% "autowire" % scalaAutowireVersion
lazy val boopickleJS = libraryDependencies += "io.suzaku" %%% "boopickle" % boopickleVersion
lazy val sourcecodeJS = libraryDependencies += "com.lihaoyi" %%% "sourcecode" % sourcecodeVersion
lazy val scalajsMarked = libraryDependencies += "org.openmole.scaladget" %%% "highlightjs" % scaladgetVersion
lazy val highlightJS = libraryDependencies += "org.openmole.scaladget" %%% "highlightjs" % scaladgetVersion
lazy val htmlparser2 = libraryDependencies += "com.definitelyscala" %%% "scala-js-htmlparser2" % "1.0.2"
lazy val plotlyJS = libraryDependencies += "org.openmole" %%% "scala-js-plotlyjs" % "1.5.2"
// lazy val scalajsLinkerJS = libraryDependencies += "org.scala-js" %%% "scalajs-linker" % scalajsVersion
// lazy val scalajsLoggingJS = libraryDependencies += "org.scala-js" %%% "scalajs-logging" % scalajsVersion
lazy val scalaCompatJS = libraryDependencies += "org.scala-lang.modules" %%% "scala-collection-compat" % "2.1.6"
......@@ -76,7 +74,7 @@ object Libraries {
lazy val scalajHttp = "org.openmole.library" %% "org-scalaj-scalaj-http" % "2.4.2"
lazy val scopt = "org.openmole.library" %% "com-github-scopt" % scoptVersion
lazy val scalabc = "org.openmole.library" %% "fr-iscpif-scalabc" % "0.4"
lazy val scalatexSite = "org.openmole.library" %% "com-lihaoyi-scalatex-site" % "0.4.5"
lazy val scalatexSite = "org.openmole.library" %% "com-lihaoyi-scalatex-site" % "0.4.6"
lazy val math = "org.openmole.library" %% "org-apache-commons-math" % "3.6.1"
lazy val collections = "org.openmole.library" %% "org-apache-commons-collections" % "4.4"
lazy val exec = "org.openmole.library" %% "org-apache-commons-exec" % "1.3"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment