Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remap ESModule imports at link time in mdoc #883

Merged
merged 96 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
0438cb7
Remap ES Modules at link time
Quafadas Jul 11, 2024
0e0e859
remap esmodules at link time
Quafadas Jul 11, 2024
54b015f
.
Quafadas Jul 11, 2024
dfde131
.
Quafadas Jul 11, 2024
e823704
Fix line no
Quafadas Jul 11, 2024
2cc6eda
remove only
Quafadas Jul 11, 2024
1b1f096
So close...
Quafadas Jul 11, 2024
7729ef0
Try snapshot
Quafadas Jul 12, 2024
fca69ab
fmt
Quafadas Jul 12, 2024
f382b3e
Pretty please work with a cherry on top
Quafadas Jul 12, 2024
c67a83a
.
Quafadas Jul 12, 2024
2e8ae38
fmt
Quafadas Jul 12, 2024
9006060
.
Quafadas Jul 12, 2024
eaa4c16
.
Quafadas Jul 12, 2024
5376abb
.
Quafadas Jul 12, 2024
57d3710
windows paths
Quafadas Jul 12, 2024
eb88458
windows, finally?
Quafadas Jul 12, 2024
16e794b
Update mdoc-js/src/main/scala/mdoc/modifiers/JsModifier.scala
Quafadas Jul 16, 2024
b89da7f
Update mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala
Quafadas Jul 16, 2024
e94ffcc
Update cli/src/main/scala/mdoc/internal/cli/Settings.scala
Quafadas Jul 16, 2024
ba8056d
Per feedback - tidy naming. Add cli args test
Quafadas Jul 16, 2024
4198a0f
Feedback: Update test
Quafadas Jul 16, 2024
6adc334
fmt
Quafadas Jul 16, 2024
533b8b5
Rename mapping function
Quafadas Jul 16, 2024
b2206d7
.
Quafadas Jul 16, 2024
0a1fc9b
Update scalameta, testkit to 4.9.8
scalameta-bot Jul 22, 2024
ff78365
Update sbt, scripted-plugin to 1.10.1
scalameta-bot Jul 22, 2024
aca5269
.
Quafadas Jul 22, 2024
23c082f
JS docs
Quafadas Jul 22, 2024
cf59660
.
Quafadas Jul 22, 2024
9962de3
too much... put back jsdocs project
Quafadas Jul 22, 2024
6ca3b32
EvaluatedMarkdownDocument interface
keynmol Feb 2, 2024
9e4c5e9
Add basic test
keynmol Jul 26, 2024
6f30481
Huh
keynmol Jul 26, 2024
1291803
Initialise map differently
keynmol Jul 26, 2024
832424a
Update docs/js.md
Quafadas Aug 14, 2024
480b1ed
Update docs/js.md
Quafadas Aug 14, 2024
28b2e1b
Update docs/js.md
Quafadas Aug 14, 2024
50b86fe
revert
Quafadas Aug 14, 2024
39b12a5
organise imports
Quafadas Aug 14, 2024
95bd8f6
.
Quafadas Aug 14, 2024
bedebef
remove commented references
Quafadas Aug 14, 2024
64b7748
Update slf4j-api to 2.0.16
scalameta-bot Aug 23, 2024
f3ed917
Update scalameta, testkit to 4.9.9
scalameta-bot Aug 23, 2024
41b8231
Update scalafmt-core to 3.8.3
scalameta-bot Aug 23, 2024
4511c9d
Update munit to 1.0.1
scalameta-bot Aug 23, 2024
4fa3cd9
Update sbt-ci-release to 1.6.1
scalameta-bot Aug 23, 2024
c7e3519
Update metaconfig-typesafe-config to 0.13.0
scalameta-bot Aug 26, 2024
64ee2f1
some feedback
Quafadas Aug 30, 2024
432cdda
Parse from stream
Quafadas Aug 30, 2024
b63b588
remove semicolon
Quafadas Aug 30, 2024
7ad139a
synatz
Quafadas Aug 30, 2024
2505970
Remap ES Modules at link time
Quafadas Jul 11, 2024
cc9a3c9
remap esmodules at link time
Quafadas Jul 11, 2024
93e3440
.
Quafadas Jul 11, 2024
58349ce
.
Quafadas Jul 11, 2024
27806fb
Fix line no
Quafadas Jul 11, 2024
596d7c0
remove only
Quafadas Jul 11, 2024
96dabd0
So close...
Quafadas Jul 11, 2024
c4ebc98
Try snapshot
Quafadas Jul 12, 2024
eb73393
fmt
Quafadas Jul 12, 2024
a7f4f02
Pretty please work with a cherry on top
Quafadas Jul 12, 2024
2872fb9
.
Quafadas Jul 12, 2024
0d2ed3a
fmt
Quafadas Jul 12, 2024
33e3f31
.
Quafadas Jul 12, 2024
a1f5559
.
Quafadas Jul 12, 2024
dc9b6ef
.
Quafadas Jul 12, 2024
6df4338
windows paths
Quafadas Jul 12, 2024
3a4765c
windows, finally?
Quafadas Jul 12, 2024
cb1e50c
Update mdoc-js/src/main/scala/mdoc/modifiers/JsModifier.scala
Quafadas Jul 16, 2024
316f741
Update mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala
Quafadas Jul 16, 2024
682b5b8
Update cli/src/main/scala/mdoc/internal/cli/Settings.scala
Quafadas Jul 16, 2024
f3363c8
Per feedback - tidy naming. Add cli args test
Quafadas Jul 16, 2024
6c6f6da
Feedback: Update test
Quafadas Jul 16, 2024
cf3ef94
fmt
Quafadas Jul 16, 2024
7e76eb9
Rename mapping function
Quafadas Jul 16, 2024
7e97011
.
Quafadas Jul 16, 2024
e7b140e
.
Quafadas Jul 22, 2024
03ea40e
JS docs
Quafadas Jul 22, 2024
bc0b4a8
.
Quafadas Jul 22, 2024
11f882d
too much... put back jsdocs project
Quafadas Jul 22, 2024
6afbc6d
Update docs/js.md
Quafadas Aug 14, 2024
1089279
Update docs/js.md
Quafadas Aug 14, 2024
81bfd41
Update docs/js.md
Quafadas Aug 14, 2024
2675800
revert
Quafadas Aug 14, 2024
8957145
organise imports
Quafadas Aug 14, 2024
225e92b
.
Quafadas Aug 14, 2024
fbd4a98
remove commented references
Quafadas Aug 14, 2024
62038db
some feedback
Quafadas Aug 30, 2024
2a79c0e
Parse from stream
Quafadas Aug 30, 2024
007f494
remove semicolon
Quafadas Aug 30, 2024
12cdf90
synatz
Quafadas Aug 30, 2024
84bf280
Merge branch 'remap2' of https://github.com/Quafadas/mdoc into remap2
Quafadas Sep 10, 2024
fefb8f6
Remove DS_Store, resolve more feedback.
Quafadas Sep 16, 2024
b40cabb
Update docs/js.md
Quafadas Sep 16, 2024
0301afa
Update docs/js.md
Quafadas Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
Binary file not shown.
16 changes: 13 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def isScala212(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 2) && v.exis
def isScala213(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 2) && v.exists(_._2 == 13)
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 3)

def jsoniter = List(
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % "2.13.5.2",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.13.5.2"
)

val isScala212 = Def.setting {
VersionNumber(scalaVersion.value).matchesSemVer(SemanticSelector("2.12.x"))
}
Expand Down Expand Up @@ -129,6 +134,7 @@ val V = new {
val fs2 = "3.10.2"

val metaconfig = "0.12.0"

}

lazy val interfaces = project
Expand Down Expand Up @@ -250,7 +256,7 @@ lazy val mdoc = project
"com.geirsson" %% "metaconfig-typesafe-config" % V.metaconfig,
"com.lihaoyi" %% "fansi" % V.fansi,
"com.lihaoyi" %% "pprint" % V.pprint
)
) ++ jsoniter
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
)
.dependsOn(parser, runtime, cli)
.enablePlugins(BuildInfoPlugin)
Expand Down Expand Up @@ -432,7 +438,10 @@ lazy val jsWorker =
.settings(
sharedSettings,
moduleName := "mdoc-js-worker",
libraryDependencies += ("org.scala-js" %% "scalajs-linker" % scalaJSVersion % Provided) cross CrossVersion.for3Use2_13
libraryDependencies ++= Seq(
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
"org.scala-js" %% "scalajs-linker" % scalaJSVersion % Provided cross CrossVersion.for3Use2_13,
"com.armanbilge" %% "scalajs-importmap" % "0.1.1" cross CrossVersion.for3Use2_13
)
)

lazy val js = project
Expand All @@ -441,7 +450,8 @@ lazy val js = project
.settings(
sharedSettings,
moduleName := "mdoc-js",
Compile / unmanagedSourceDirectories ++= multiScalaDirectories("js").value
Compile / unmanagedSourceDirectories ++= multiScalaDirectories("js").value,
libraryDependencies ++= jsoniter
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
)
.dependsOn(mdoc)

Expand Down
3 changes: 1 addition & 2 deletions cli/src/main/scala/mdoc/internal/cli/MdocProperties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ object MdocProperties {
out = getPath("out")
)
}
def default(cwd: AbsolutePath): MdocProperties = {
val path = "mdoc.properties"
def default(cwd: AbsolutePath, path: String): MdocProperties = {
Option(this.getClass.getClassLoader.getResourceAsStream(path)) match {
case Some(resource) =>
val props = new java.util.Properties()
Expand Down
27 changes: 21 additions & 6 deletions cli/src/main/scala/mdoc/internal/cli/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import mdoc.internal.markdown.{GitHubIdGenerator, ReplVariablePrinter}
import mdoc.internal.cli.CliEnrichments._
import pprint.TPrint
import pprint.TPrintColors
import java.nio.file.Path
Quafadas marked this conversation as resolved.
Show resolved Hide resolved

class Section(val name: String) extends StaticAnnotation

Expand Down Expand Up @@ -155,7 +156,15 @@ case class Settings(
variablePrinter: Variable => String = ReplVariablePrinter,
@Hidden()
@Description("The Coursier logger used to report progress bars when downloading dependencies")
coursierLogger: coursierapi.Logger = coursierapi.Logger.progressBars()
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
coursierLogger: coursierapi.Logger = coursierapi.Logger.progressBars(),
@Description(
"The absolute path to a file containing an import map file in this format; https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap"
)
importMapPath: Option[AbsolutePath] = None,
@Description(
"Defaults to mdoc.properties. This is the name of the properties file the CLI will read. It is assumed to be a resource on the classpath. Use the --extra-jars flag to customise the directory it is found in"
)
propFileName: String = "mdoc.properties"
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
) extends mdoc.parser.ParserSettings {

val isMarkdownFileExtension = markdownExtensions.toSet
Expand Down Expand Up @@ -261,9 +270,9 @@ object Settings { // extends MetaconfigScalametaImplicits with Decoders with Set
cwd = cwd
)
}
def default(cwd: AbsolutePath): Settings = {
def default(cwd: AbsolutePath, filename: String): Settings = {
val base = baseDefault(cwd)
val props = MdocProperties.default(cwd)
val props = MdocProperties.default(cwd, filename)
base.withProperties(props)
}

Expand Down Expand Up @@ -294,14 +303,20 @@ object Settings { // extends MetaconfigScalametaImplicits with Decoders with Set
generic.deriveDecoder[Settings](base)
}

def fromCliArgs(args: List[String], base: Settings): Configured[Settings] = {
def fromCliArgs(args: List[String], workingDirectory: Path): Configured[Settings] = {
Conf
.parseCliArgs[Settings](args)
.andThen(conf => {
val base =
Settings.default(
AbsolutePath(workingDirectory),
conf.get[String]("propFileName").getOrElse("mdoc.properties")
)
val cwd = conf.get[String]("cwd").map(AbsolutePath(_)(base.cwd)).getOrElse(base.cwd)
conf.as[Settings](decoder(base.copy(cwd = cwd)))
conf
.as[Settings](decoder(base.copy(cwd = cwd)))
.map(_.addSite(base.site))
})
.map(_.addSite(base.site))
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
}

def write(set: Settings) = ConfEncoder[Settings].write(set)
Expand Down
4 changes: 3 additions & 1 deletion docs/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ js-linker-classpath=$(coursier fetch org.scalameta:mdoc-js-worker_@SCALA_BINARY_
EOT
```

Note: For scala 3, you may need `js-scalac-options=--scala-js` - this is currently untested.
Note: For scala 3, you may need `js-scalac-options=-scalajs` - instead of the XPlugin incantation - [Doc](https://docs.scala-lang.org/scala3/guides/migration/options-lookup.html#compiler-plugins).
Quafadas marked this conversation as resolved.
Show resolved Hide resolved



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

Expand Down
12 changes: 10 additions & 2 deletions mdoc-js-interfaces/src/main/java/ScalajsConfig.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
package mdoc.js.interfaces;

import java.util.Map;

public class ScalajsConfig {
public ModuleType moduleType;
public boolean fullOpt;
public boolean sourceMap;
public boolean batchMode;
public boolean closureCompiler;
public Map<String, String> importMap;

public ScalajsConfig() {
}

public ScalajsConfig withModuleKind(ModuleType kind) {
if(kind == ModuleType.ESModule)
if (kind == ModuleType.ESModule)
this.moduleType = ModuleType.ESModule;
else if (kind == ModuleType.NoModule)
this.moduleType = ModuleType.NoModule;
Expand All @@ -20,6 +23,11 @@ else if (kind == ModuleType.CommonJSModule)
return this;
}

public ScalajsConfig withImportMap(Map<String, String> importMap) {
this.importMap = importMap;
return this;
}

public ScalajsConfig withOptimized(boolean enabled) {
this.fullOpt = enabled;
return this;
Expand Down
26 changes: 22 additions & 4 deletions mdoc-js-worker/src/main/scala/ScalaJSWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ import org.scalajs.logging.Logger
import org.scalajs.logging.Level
import org.scalajs.linker.standard.MemIRFileImpl
import org.scalajs.linker.interface.Semantics
import scala.collection.JavaConverters._
import com.armanbilge.sjsimportmap.ImportMappedIRFile

class ScalaJSWorker(
config: ScalajsConfig,
logger: Logger
) extends ScalajsWorkerApi {
case class IFile(mem: IRFile) extends ScalajsWorkerApi.IRFile

val linker = {
val cfg =
StandardConfig()
Expand All @@ -43,6 +47,12 @@ class ScalaJSWorker(
StandardImpl.clearableLinker(cfg)
}

lazy val remapFct = config.importMap.asScala.toSeq.foldLeft((in: String) => in) {
case (fct, (s1, s2)) =>
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
val fct2: (String => String) = (in => in.replace(s1, s2))
(in => fct(fct2(in)))
}

var cachedFiles = Seq.empty[org.scalajs.linker.interface.IRFile]

val cache = StandardImpl.irFileCache().newCache
Expand All @@ -62,10 +72,18 @@ class ScalaJSWorker(
val mem = MemOutputDirectory()
val report = Await.result(
linker.link(
cachedFiles.toSeq ++
in.toSeq.collect { case IFile(o) =>
o
},
(
cachedFiles.toSeq ++
in.toSeq
.collect { case IFile(o) =>
o
}
).map { ir =>
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
if (config.importMap.isEmpty)
ir
else
ImportMappedIRFile.fromIRFile(ir)(remapFct)
},
Seq.empty,
mem,
logger
Expand Down
15 changes: 13 additions & 2 deletions mdoc-js/src/main/scala/mdoc/modifiers/JsConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import scala.meta.internal.io.PathIO
import scala.meta.io.AbsolutePath
import scala.meta.io.Classpath
import mdoc.js.interfaces._
import scala.collection.immutable.HashMap
import com.github.plokhotnyuk.jsoniter_scala.core._
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
import mdoc.modifiers.ImportMapJsonIr.ImportMap

case class JsConfig(
moduleKind: ModuleType = ModuleType.NoModule,
Expand All @@ -20,7 +23,8 @@ case class JsConfig(
fullOpt: Boolean = true,
htmlPrefix: String = "",
relativeLinkPrefix: String = "",
batchMode: Boolean = false
batchMode: Boolean = false,
importMap: Map[String, String] = Map.empty
) {
lazy val isCommonJS: Boolean = moduleKind == ModuleType.CommonJSModule
lazy val isEsModule: Boolean = moduleKind == ModuleType.ESModule
Expand Down Expand Up @@ -99,7 +103,14 @@ object JsConfig {
}
},
relativeLinkPrefix = ctx.site.getOrElse("js-relative-link-prefix", base.relativeLinkPrefix),
batchMode = ctx.site.getOrElse("js-batch-mode", "false").toBoolean
batchMode = ctx.site.getOrElse("js-batch-mode", "false").toBoolean,
importMap = ctx.settings.importMapPath match {
case None => new HashMap[String, String]()
case Some(value) =>
val importMapRaw = scala.io.Source.fromFile(value.toFile).getLines().mkString("\n")
val importMapParsed = readFromString[ImportMap](importMapRaw)
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
importMapParsed.imports
}
)
}
}
19 changes: 19 additions & 0 deletions mdoc-js/src/main/scala/mdoc/modifiers/JsImportMap.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package mdoc.modifiers

import com.github.plokhotnyuk.jsoniter_scala.core._
import com.github.plokhotnyuk.jsoniter_scala.macros._

object ImportMapJsonIr {

type Scope = Map[String, String]

final case class ImportMap(
val imports: Map[String, String],
val scopes: Option[Map[String, Scope]]
)

object ImportMap {
implicit val codec: JsonValueCodec[ImportMap] = JsonCodecMaker.make
}

}
5 changes: 4 additions & 1 deletion mdoc-js/src/main/scala/mdoc/modifiers/JsModifier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class JsModifier extends mdoc.PreModifier {
.withModuleKind(config.moduleKind)
.withSourceMap(false)
.withBatchMode(config.batchMode)
.withClosureCompiler(config.fullOpt)
.withClosureCompiler(
config.fullOpt && !(config.moduleKind == ModuleType.ESModule)
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
) // Closure compiler dosen't work with ESModules
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
.withImportMap(config.importMap.asJava)
}

override def onLoad(ctx: OnLoadContext): Unit = {
Expand Down
19 changes: 17 additions & 2 deletions mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ object MdocPlugin extends AutoPlugin {
case other => "org.scala-js" % s"scalajs-linker_$other" % sjsVersion
}

val importMapDependency = binaryVersion match {
case "3" => "com.armanbilge" % "scalajs-importmap_2.13" % "0.1.1"
case other =>
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
"com.armanbilge" % s"scalajs-importmap_$other" % "0.1.1"
}

val mdocJSDependency = binaryVersion match {
case "3" => "org.scalameta" % "mdoc-js-worker_3" % BuildInfo.version
case other => "org.scalameta" % s"mdoc-js-worker_$other" % BuildInfo.version
Expand All @@ -167,7 +173,8 @@ object MdocPlugin extends AutoPlugin {
MdocJSConfiguration(
scalacOptions = options.options,
compileClasspath = options.classpath,
linkerClassPath = getJars(linkerDependency) ++ workerClasspath,
linkerClassPath =
getJars(linkerDependency) ++ workerClasspath ++ getJars(importMapDependency),
Quafadas marked this conversation as resolved.
Show resolved Hide resolved
moduleKind = options.moduleKind,
jsLibraries = libraries
).writeTo(props)
Expand All @@ -188,7 +195,15 @@ object MdocPlugin extends AutoPlugin {
classpath.mkString(java.io.File.pathSeparator)
)
IO.write(props, "mdoc properties", out)
List(out)
val esVersion = props.clone().asInstanceOf[java.util.Properties]
esVersion.put("js-module-kind", "ESModule")
val esOut = managedResourceDirectories.in(Compile).value.head / "es.properties"
IO.write(
esVersion,
"mdoc esmoddule properties",
esOut
)
List(out, esOut) // Both of these are used in the JsCliSuite Integration tests
}
)

Expand Down
3 changes: 1 addition & 2 deletions mdoc/src/main/scala/mdoc/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ trait MainProcess {
process(args, new ConsoleReporter(out), cwd)
}
def process(args: Array[String], reporter: Reporter, cwd: Path): Int = {
val base = Settings.default(AbsolutePath(cwd))
val ctx = Settings.fromCliArgs(args.toList, base)
val ctx = Settings.fromCliArgs(args.toList, cwd)
MainOps.process(ctx, reporter)
}
def process(settings: MainSettings): Int = {
Expand Down
8 changes: 4 additions & 4 deletions mdoc/src/main/scala/mdoc/MainSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class MainSettings private (
def withArgs(args: List[String]): MainSettings = {
if (args.isEmpty) this
else {
Settings.fromCliArgs(args, settings) match {
Settings.fromCliArgs(args, settings.cwd.toNIO) match {
case Configured.Ok(newSettings) =>
copy(settings = newSettings)
case Configured.NotOk(error) =>
Expand Down Expand Up @@ -121,12 +121,12 @@ final class MainSettings private (
}

object MainSettings {
def apply(workingDirectory: Path): MainSettings = {
val settings = Settings.default(AbsolutePath(workingDirectory))
def apply(workingDirectory: Path, propertiesFileName: String): MainSettings = {
val settings = Settings.default(AbsolutePath(workingDirectory), propertiesFileName)
val reporter = ConsoleReporter.default
new MainSettings(settings, reporter)
}
def apply(): MainSettings = {
MainSettings(PathIO.workingDirectory.toNIO)
MainSettings(PathIO.workingDirectory.toNIO, "mdoc.properties")
}
}
5 changes: 5 additions & 0 deletions tests/unit-js/src/test/resources/importmap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"imports": {
"@stdlib/blas": "https://cdn.jsdelivr.net/npm/@stdlib/[email protected]/+esm"
}
}
Loading