diff --git a/lib/IUtils.rakumod b/lib/IUtils.rakumod index 007c255..3ec2b99 100644 --- a/lib/IUtils.rakumod +++ b/lib/IUtils.rakumod @@ -122,8 +122,12 @@ sub scan-ipkg(IO::Path:D $ipkg --> PackageInfo:D) { '"' $=[<-["]>*] '"' /) // "src"; + my sub is-source(Str:D $file --> Bool) { + return $file.ends-with(".idr") || $file.ends-with(".md"); + } + my IO::Path:D @sources = - paths($ipkg.parent.add($src-dir), :file(*.ends-with(".idr"))).map(*.IO); + paths($ipkg.parent.add($src-dir), :file(&is-source)).map(*.IO); PackageInfo.new(ipkg => $ipkg, root => $ipkg.parent, sources => @sources) }