Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering Closure/Soy Custom Functions #153

Closed
lpellegr opened this issue Dec 23, 2020 · 2 comments · Fixed by #563
Closed

Registering Closure/Soy Custom Functions #153

lpellegr opened this issue Dec 23, 2020 · 2 comments · Fixed by #563

Comments

@lpellegr
Copy link
Contributor

Closure templates supports custom functions via plugins:
https://github.com/google/closure-templates/blob/master/documentation/dev/plugins.md

Unfortunately, I cannot find how to register a custom function with micronaut-views. Is this supported? is there an example somewhere?

@lpellegr lpellegr changed the title Registering Closure/Soy Functions Registering Closure/Soy Custom Functions Dec 23, 2020
@lpellegr
Copy link
Contributor Author

lpellegr commented Dec 23, 2020

Just got how to register custom functions. This must be done in SoyFileSetProvider.provideSoyFileSet. The class SoyFileSet.Builder has methods addSourceFunction and addSourceFunctions. It could be helpful for others to provide an example in the docs.

@sdelamo
Copy link
Contributor

sdelamo commented Jul 10, 2023

@wetted can you document at least with a sentence how to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants