Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chandu0101 committed Dec 28, 2017
1 parent e134d54 commit b625179
Show file tree
Hide file tree
Showing 9 changed files with 1,125 additions and 443 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: scala

scala:
- 2.12.2
- 2.11.11
- 2.12.4

jdk:
- oraclejdk8
Expand Down
24 changes: 12 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name := "web-router"

//version := "2017.7.0-SNAPSHOT"
//version := "2017.12.0-SNAPSHOT"

enablePlugins(ScalaJSPlugin)

val scala211 = "2.11.11"

val scala212 = "2.12.2"
val scala212 = "2.12.4"

scalaVersion := scala211
scalaVersion := scala212

crossScalaVersions := Seq(scala211, scala212)
crossScalaVersions := Seq(scala212)

scalacOptions ++= Seq(
"-feature",
Expand All @@ -22,8 +21,8 @@ scalacOptions ++= Seq(
//deps

libraryDependencies ++= Seq(
"scalajs-react-interface" %%% "core" % "2017.7.9-RC" % Provided,
"scalajs-react-interface" %%% "universal" % "2017.7.9-RC" % Provided)
"scalajs-react-interface" %%% "core" % "2017.12.28-RC" % Provided,
"scalajs-react-interface" %%% "universal" % "2017.12.28-RC" % Provided)

//bintray
resolvers += Resolver.jcenterRepo
Expand Down Expand Up @@ -70,13 +69,14 @@ def runJest() = {
if (jestResult != 0) throw new IllegalStateException("Jest Suite failed")
}

resolvers += Resolver.bintrayRepo("scalajs-react-interface", "maven")
resolvers += Resolver.bintrayRepo("scalajs-jest", "maven")
resolvers ++=Seq(Resolver.bintrayRepo("scalajs-react-interface", "maven"),
Resolver.bintrayRepo("scalajs-jest", "maven"),
Resolver.bintrayRepo("scalajs-plus", "maven"))

libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.3" % Test,
"scalajs-jest" %%% "core" % "2017.7.9-beta" % Test,
"scalajs-react-interface" %%% "web" % "2017.7.9-RC" % Test
"org.scala-js" %%% "scalajs-dom" % "0.9.4" % Test,
"scalajs-jest" %%% "core" % "2017.12.27-RC" % Test,
"scalajs-react-interface" %%% "web" % "2017.12.28-RC" % Test
)
//scalaJSStage in Global := FastOptStage
scalaJSStage in Global := FullOptStage
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
},
"devDependencies": {},
"dependencies": {
"history": "^4.6.1",
"jest": "^20.0.4",
"path-to-regexp": "^1.7.0",
"react": "next",
"react-dom": "next"
"history": "^4.7.2",
"jest": "^22.0.4",
"path-to-regexp": "^2.1.0",
"react": "^16.2.0",
"react-dom": "^16.2.0"
}
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=0.13.15
sbt.version=1.0.4

8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "1.3.0")
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "2.0.0")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.2")
6 changes: 3 additions & 3 deletions src/main/scala/sri/web/router/History.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package sri.web.router

import sri.macros.{FunctionObjectMacro, OptDefault, OptionalParam}

import scalajsplus.{OptDefault, OptionalParam}
import scalajsplus.macros.FunctionObjectMacro
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSImport, JSName, ScalaJSDefined}
import scala.scalajs.js.annotation.{JSImport, JSName}
import scala.scalajs.js.|

@js.native
Expand Down
3 changes: 1 addition & 2 deletions src/test/scala/sri/web/router/RouterExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import sri.core.{
JSProps,
React,
ReactElement,
ReactRenderNode,
ReactScalaClass
}

import scala.scalajs.js
import scala.scalajs.js.JSON
import scala.scalajs.js.annotation.{JSImport, JSName, ScalaJSDefined}
import scala.scalajs.js.annotation.{JSImport, JSName}

object RouterExample {
// for testing purpose
Expand Down
8 changes: 3 additions & 5 deletions src/test/scala/sri/web/router/RouterTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ class RouterTest extends BaseTest {
dom.document.getElementById("app"))
}

test("should render home component on initial render", () => {
test("should render home component on initial render") {
render()
expect(dom.document.body.textContent).toBe("home")
})
}
test(
"should render second screen",
() => {
"should render second screen"){
render()
RouterExample.navigation.navigate[StaticSecondScreen]()
expect(dom.document.body.textContent).toBe("second")
}
)
}
Loading

0 comments on commit b625179

Please sign in to comment.