Add a project_dir argument

This commit is contained in:
Nathan McCarty 2024-12-20 08:43:30 +00:00
parent 66bb33b332
commit f916a94c64

View file

@ -50,7 +50,13 @@ sub render-idris-file($idr) {
$out-file.spurt: $contents;
}
sub MAIN() {
sub MAIN(
$project_dir? #= Base directory of project to upload, defaults to %*CWD
) {
if $project_dir ~~ Str {
$*CWD = $project_dir.IO.resolve;
};
# Find and collect all of our idris files
my @idris-files =
paths("src", :file(-> $a {$a.ends-with(".idr") || $a.ends-with(".md")}))