Skip to content

Instantly share code, notes, and snippets.

@jaredallard
Last active September 28, 2024 04:30
Show Gist options
  • Save jaredallard/4a98a26b5923c9dcd9da262f3b7aadc6 to your computer and use it in GitHub Desktop.
Save jaredallard/4a98a26b5923c9dcd9da262f3b7aadc6 to your computer and use it in GitHub Desktop.
Example of how the new cross-module function calls work
{{- define "HelloWorld" }}
Hello, world!
{{- end }}
# Exports the "define" template above allowing it to be called.
# Must be in a .library.tpl, as we are. Must start w/ capital
# letter.
{{- module.Export "HelloWorld" }}
# Output: Hello, world!
{{- module.Call "module-a.HelloWorld" }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment