-
Notifications
You must be signed in to change notification settings - Fork 562
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
Example Handlebars template #181
Comments
I assume you mean a template for output using registerTemplate? If so, we will be deprecating that in the future. #152 will remove registerTemplates towards the more standard format methods. Examples on how to use templates for formats will be included in the documentation. With that said, this is a specific example showing how you might add a Handlebars template using registerTemplate in the current system. If you meant something else, please let us know and we can try to be more helpful. Thanks! |
Yep. We've been looking into the example of how you might add a Handlebars Template to the system... But what I'm asking about is the actually the template itself. We have a template for markdown:
But we're looking for just a small example like this in handlebars. Full disclosure: I've never used handlebars before today and I've been having issues trying to get anything I write into a "MyTemplate.hbs" file to compile. I keep getting:
and this is totally because I don't know what I'm doing regarding handlebars. |
Hey @MatthewScheuerman I made a quick example package for ya: https://github.com/dbanksdesign/style-dictionary-example-handlebars Let me know if that helps! @chazzmoney we need to update our documentation a bit, the example code won't actually work... |
@dbanksdesign Yikes! Can you make sure that what I have in #152 in terms of documentation will work? If not, can you correct it in |
@dbanksdesign Thanks! Downloaded the code and I'm eager to dive into it more. Will the issue with what's in the documentation keep us from compiling? Regardless, I'll run it tomorrow and test. Thanks again! |
@MatthewScheuerman The issue with the documentation shouldn't stop you, just follow the code that I posted, I tested it and it works. @chazzmoney I will make a PR to update the documentation in the remove-templates branch |
@dbanksdesign Thanks for the help. that got us running with handlebars. Appreciated. |
@MatthewScheuerman Thanks for pointing out the confusing documentation. This is fixed now w/ #182. |
Today I was trying to get a handlebars template up and running and couldn't.
Very low priority: but does anyone have an example handlebars template they would be ok with sharing?
The text was updated successfully, but these errors were encountered: