Skip to content

Commit

Permalink
update to scalajs 1.0.0-M1
Browse files Browse the repository at this point in the history
  • Loading branch information
chandu0101 committed Jul 8, 2017
1 parent c3f22dd commit d9e3dab
Show file tree
Hide file tree
Showing 20 changed files with 4,486 additions and 435 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore" : ["sjs.test.js"]
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ npm-debug.log


#project
incubation/assets/
incubation/assets/
*.test.js
*.test.js.map
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ env:
JSENV=node

script:
- sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS
- sbt ++$TRAVIS_SCALA_VERSION 'set parallelExecution in ThisBuild := false' test
- sbt ++$TRAVIS_SCALA_VERSION 'set parallelExecution in ThisBuild := false' 'set scalaJSStage in ThisBuild := FullOptStage' test
- sbt ++$TRAVIS_SCALA_VERSION testDev testProd


deploy:
Expand Down
46 changes: 41 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "vdom"

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

enablePlugins(ScalaJSPlugin)

Expand All @@ -21,8 +21,9 @@ scalacOptions ++= Seq(

//Dependencies
libraryDependencies ++= Seq(
"scalajs-react-interface" %%% "core" % "2017.3.26-beta" % Provided,
"scalajs-react-interface" %%% "universal" % "2017.4.9-beta" % Provided
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
"scalajs-react-interface" %%% "core" % "2017.7.9-RC" % Provided,
"scalajs-react-interface" %%% "universal" % "2017.7.9-RC" % Provided
)

//bintray
Expand All @@ -43,5 +44,40 @@ publishArtifact in Test := false

//Test
resolvers += Resolver.bintrayRepo("scalajs-react-interface", "maven")
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.0" % Test
scalaJSStage in Global := FastOptStage
scalaJSUseMainModuleInitializer in Test := true

scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))

val TEST_FILE = s"./sjs.test.js"

artifactPath in Test in fastOptJS := new File(TEST_FILE)
artifactPath in Test in fullOptJS := new File(TEST_FILE)

val testDev = Def.taskKey[Unit]("test in dev mode")
val testProd = Def.taskKey[Unit]("test in prod mode")

testDev := {
(fastOptJS in Test).value
runJest()
}

testProd := {
(fullOptJS in Test).value
runJest()
}

def runJest() = {
import sys.process._
val jestResult = "npm test".!
if (jestResult != 0) throw new IllegalStateException("Jest Suite failed")
}

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

libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.3" % Test,
"scalajs-jest" %%% "core" % "2017.7.9-beta" % Test
)
//scalaJSStage in Global := FastOptStage
scalaJSStage in Global := FullOptStage
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
"url": ""
},
"scripts": {
"start": "webpack --watch & webpack-dev-server --progress --colors --port 8090",
"build": "webpack --watch"
},
"devDependencies": {
"jsdom-global": "2.1.1",
"jsdom": "^9.9.1"
"test": "jest"
},
"devDependencies": {},
"dependencies": {

"jest": "^20.0.4"
}
}
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.13
sbt.version=0.13.15

4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.15")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "1.1.1")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "1.3.0")
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
Loading

0 comments on commit d9e3dab

Please sign in to comment.