From 2fe3b69a62bf62b04b842265beb5a4c1b3db987b Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 23 Jan 2026 12:06:43 +0100 Subject: [PATCH] added includeLibraries option which simply copies the contents of the docs folder from all library dependencies --- .../tutor/lang/rascal/tutor/Compiler.rsc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/org/rascalmpl/tutor/lang/rascal/tutor/Compiler.rsc b/src/org/rascalmpl/tutor/lang/rascal/tutor/Compiler.rsc index 12e2f883f9..b0e7500e8e 100644 --- a/src/org/rascalmpl/tutor/lang/rascal/tutor/Compiler.rsc +++ b/src/org/rascalmpl/tutor/lang/rascal/tutor/Compiler.rsc @@ -78,6 +78,7 @@ int main(PathConfig pcfg = getProjectPathConfig(|cwd:///|), bool errorsAsWarnings = false, bool warningsAsErrors = false, bool isPackageCourse = false, + bool includeLibraries = false, str groupId = "org.rascalmpl", str artifactId = "rascal", str version = getRascalVersion(), @@ -102,6 +103,19 @@ int main(PathConfig pcfg = getProjectPathConfig(|cwd:///|), if (verbose) iprintln(pcfg); + if (includeLibraries) { + jobStart("Including libraries", totalWork=size(pcfg.libs)); + + for (loc lib <- pcfg.libs) { + jobStep("Including libraries", ""); + copy(lib + "docs", pcfg.bin + "docs", recursive=true); + remove(pcfg.bin + "docs" + "index.value"); + } + + jobEnd("Including libraries"); + } + + messages = compile(pcfg); return mainMessageHandler(messages, projectRoot=pcfg.projectRoot, errorsAsWarnings=errorsAsWarnings, warningsAsErrors=warningsAsErrors); @@ -117,6 +131,7 @@ list[Message] compile(PathConfig pcfg, CommandExecutor exec = createExecutor(pcf // all documentation ends up nested under the `docs` folder in the target pcfg.bin = pcfg.bin + "docs"; + ind = createConceptIndex(pcfg); jobStart("Compiling courses", totalWork=size(pcfg.srcs));