Skip to content

Commit

Permalink
Make sample code more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
japgolly committed Jun 9, 2020
1 parent a5de514 commit 2aa3a22
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ This repository contains `scalajs-env-phantomjs` for Scala.js 1.x. In Scala.js
// project/plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs-env-phantomjs" % "1.0.0")

// Add an explicit import if using project/*.scala
import org.scalajs.jsenv.phantomjs.sbtplugin.PhantomJSEnvPlugin.autoImport._

// build.sbt (inside .settings(...) for multi-project builds)
jsEnv := PhantomJSEnv().value
scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) }
Test / jsEnv := PhantomJSEnv().value
Test / scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) }
```

The last line is needed because Scala.js emits ECMAScript 2015 code by default,
Expand Down

0 comments on commit 2aa3a22

Please sign in to comment.