From 37b15d27cbd2f6e689fe40e83b4a6205d3e22296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 14 Feb 2020 16:13:49 +0100 Subject: [PATCH] Add usage instructions and link to Scaladoc. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 6fa9bdd..d04a017 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,19 @@ running [Node.js](https://nodejs.org/) with This repository contains `scalajs-env-jsdom-nodejs` for Scala.js 1.x. In Scala.js 0.6.x, the Node.js with jsdom environment is part of the core distribution. + +## Usage + +Add the following line to `project/plugins.sbt`: + +```scala +libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.0.0" +``` + +and the following line to `build.sbt` (possibly in the `settings`/`jsSettings` of Scala.js projects): + +```scala +jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv() +``` + +See [the Scaladoc](https://javadoc.io/doc/org.scala-js/scalajs-env-jsdom-nodejs_2.13/latest/org/scalajs/jsenv/jsdomnodejs/index.html) for other configuration options.