com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
758 stars 117 forks source link

Difficult to change to new version without help #89

Closed chrismurrph closed 9 years ago

chrismurrph commented 9 years ago

Is there any ScalaDocs or something similar to help with the new package structure? For instance I am having a problem with this:

import scalatags.JsDom.all._

What is the new alternative? It would be good if for example the jsFiddle example used the latest. Just need something to go on in order to be able to use the latest...

Also having an issue knowing what to import for 'onclick' to work again.

I tried the imports used in your documentation but they do not work either.

This is the artifact: "com.lihaoyi" % "scalatags_2.11" % "0.5.2"

If anyone is here trying to work this out, this is something I've discovered so far: import scalatags.Text.all._

The specific code I'm having trouble with at the moment is: val res = td(style := myGasesTable_td).render res.onclick = { (e: dom.Event) => c.clickTD(e.srcElement)}

chrismurrph commented 9 years ago

Okay I am going to close this issue as I did manage to find enough documentation out there. This is the build.sbt file I got to work in the end:

name := "Atmosphere root project"

lazy val root = project.in(file(".")). aggregate(atmosphereJS, atmosphereJVM). settings( publish := {}, publishLocal := {}, scalaVersion := "2.11.6" )

val atmosphere = crossProject.in(file(".")).settings( unmanagedSourceDirectories in Compile += baseDirectory.value / "shared" / "src" / "main" / "scala", libraryDependencies ++= Seq( "com.lihaoyi" %%% "scalatags" % "0.4.6", "com.lihaoyi" %%% "upickle" % "0.2.7", "com.lihaoyi" %%% "autowire" % "0.2.5" ), scalaVersion := "2.11.6" ).jsSettings( libraryDependencies ++= Seq( "org.scala-js" %%% "scalajs-dom" % "0.8.0" ) ).jvmSettings( libraryDependencies ++= Seq( "io.spray" %% "spray-can" % "1.3.2", "io.spray" %% "spray-routing" % "1.3.2", "com.typesafe.akka" %% "akka-actor" % "2.3.6" ) )

lazy val atmosphereJS = atmosphere.js lazy val atmosphereJVM = atmosphere.jvm.settings( (resources in Compile) += (fullOptJS in (atmosphereJS, Compile)).value.data )