Skip to content

Commit

Permalink
Update cli docs for scala JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas authored and tgodzik committed Jan 14, 2024
1 parent bd750aa commit 6583055
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ configuration
cat <<EOT > mdoc.properties
js-classpath=$(coursier fetch org.scala-js:scalajs-library_@SCALA_BINARY_VERSION@:@SCALAJS_VERSION@ org.scala-js:scalajs-dom_sjs@SCALAJS_BINARY_VERSION@_@SCALA_BINARY_VERSION@:@SCALAJS_DOM_VERSION@ -p)
js-scalac-options=-Xplugin:$(coursier fetch --intransitive org.scala-js:scalajs-compiler_@SCALA_VERSION@:@SCALAJS_VERSION@)
js-linker-classpath=$(coursier fetch org.scalameta:mdoc-js-worker_@SCALA_BINARY_VERSION@:@@VERSION@ org.scala-js:scalajs-linker_@SCALA_BINARY_VERSION@:@SCALAJS_VERSION@ -p)
EOT
```

Note: For scala 3, you may need `js-scalac-options=--scala-js` - this is currently untested.

Next, create a basic Markdown files with an `mdoc:js` modifier:

```sh
Expand Down Expand Up @@ -402,7 +405,7 @@ By default, mdoc will re-use the Scala.js linker, exercising its ability to work
incrementally. This can speed up linking and optimization dramatically.

If incremental linking is causing issues in your project, use can use `js-batch-mode`
site variable to enable batch mode (which will discard intermediate linker state
site variable to enable batch mode (which will discard intermediate linker state
after processing each file):

```scala
Expand Down

0 comments on commit 6583055

Please sign in to comment.