Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Last active January 1, 2025 21:28
A small example
diff --git a/lib/Cromponent.rakumod b/lib/Cromponent.rakumod
index 1bb5708..668d2de 100644
--- a/lib/Cromponent.rakumod
+++ b/lib/Cromponent.rakumod
@@ -234,8 +234,13 @@ sub cromponent-library($component) is export {
multi EXPORT(--> Map()) {
'&trait_mod:<is>' => &trait_mod:<is>,
- '&EXPORT' => sub {
- [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map
+ '&EXPORT' => sub {
+ my %export-map will begin -> %m {
+ use Cro::WebApp::Template::Repository;
+ my $*TEMPLATE-REPOSITORY = get-template-repository;
+ %m = [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map;
+ }
+ %export-map
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment