--- a/src/Pure/System/nodejs.scala Mon Sep 08 22:43:15 2025 +0200
+++ b/src/Pure/System/nodejs.scala Mon Sep 08 23:03:31 2025 +0200
@@ -77,9 +77,13 @@
def path_setup: String =
"export PATH=" + Bash.string(platform_context.standard_path(bin_dir)) + """:"$PATH""""
- def install(name: String): Unit = {
+ def install(name: String, production: Boolean = false): Unit = {
progress.echo("Installing " + name + " ...")
- Isabelle_System.bash(path_setup + "\nnpm install -g " + Bash.string(name), cwd = path).check
+ Isabelle_System.bash(
+ Library.make_lines(
+ path_setup,
+ "npm install --global " + if_proper(production, "--production ") + Bash.string(name)),
+ cwd = path).check
}
}