https://github.com/scala-js/scala-js-env-phantomjs
PhantomJS environment for Scala.js
https://github.com/scala-js/scala-js-env-phantomjs
Last synced: 7 months ago
JSON representation
PhantomJS environment for Scala.js
- Host: GitHub
- URL: https://github.com/scala-js/scala-js-env-phantomjs
- Owner: scala-js
- License: bsd-3-clause
- Created: 2017-05-17T09:29:09.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-12-01T10:23:46.000Z (almost 4 years ago)
- Last Synced: 2024-03-27T01:12:52.068Z (over 1 year ago)
- Language: Scala
- Size: 188 KB
- Stars: 2
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scalajs-env-phantomjs
`scalajs-env-phantomjs` is a JavaScript environment for Scala.js (a `JSEnv`)
running [PhantomJS](http://phantomjs.org/).
This repository contains `scalajs-env-phantomjs` for Scala.js 1.x. In Scala.js
0.6.x, the PhantomJS environment is part of the core distribution.
## Setup
```scala
// project/plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs-env-phantomjs" % "1.0.0")
// build.sbt (inside .settings(...) for multi-project builds)
jsEnv := PhantomJSEnv().value
scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) }
```
The last line is needed because Scala.js emits ECMAScript 2015 code by default,
but PhantomJS only supports ES 5.1.
See [the Scaladoc](https://javadoc.io/doc/org.scala-js/scalajs-env-phantomjs_2.13/latest/org/scalajs/jsenv/phantomjs/index.html) for other configuration options.