feat(engine-twig): add custom twing extensions#1435
feat(engine-twig): add custom twing extensions#1435JosefBredereck merged 4 commits intopattern-lab:devfrom
Conversation
|
That is an exciting extension of the pattern lab workspace. I want to request additional documentation for the parameter and what the extension file must contain. @mfranzke, what do you think? Where is the best place to put this documentation? |
@JosefBredereck Valid question. I would say that it's important to mention |
|
@hadl do you want to add the documentation to this PR or in another one? |
|
docs added as @mfranzke suggested |
Closes: #1230
Summary of changes:
engines -> twig -> loadExtensionsFiletwingExtensions.js) and"loadExtensionsFile": "twingExtensions.js"TwingEnvironment.addExtensions(extensions: Map<string, TwingExtensionInterface>)Example
See https://nightlycommit.github.io/twing/advanced.html#creating-an-extension for more details on how to create extensions