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

add raw-helper handlebars helper to init #64

Merged
merged 2 commits into from
May 6, 2022

Conversation

Karnith
Copy link
Contributor

@Karnith Karnith commented May 2, 2022

add raw-helper from handlebars to init so that complex templates that already use {{}} in their code, like vue templates, will work with init and preserve the code unchanged.

usage:

{{{{raw-helper}}}}
{bar}
{{{{/raw-helper}}}}

will produce {bar} instead of throwing an exception when creating a project from a template using {{}} in it's codebase.

added raw-helper to deal with complex templates that may make use of {{}} in files
Added raw-helper handlebars helper
@intech
Copy link
Member

intech commented May 4, 2022

@Karnith Thanks, add tests for this helper, please.

@Karnith
Copy link
Contributor Author

Karnith commented May 4, 2022

@intech So how would I do that? I don't see any tests for the other init handlebar helpers in repo to base a test on? In fact, I don't see any tests for init in repo at all. Am I missing something?

@intech
Copy link
Member

intech commented May 4, 2022

@Karnith You are right, and it seems that we have this project isn't covered with tests completely 🤨

@intech intech requested a review from icebob May 4, 2022 23:15
@Karnith
Copy link
Contributor Author

Karnith commented May 5, 2022

@intech If it helps any to get this approved, the raw-helper is native to handlebars library. I just added it as a register as specified on the handlebars website here raw-blocks. If you need an example of how it works, I use it with my moleculer template so that handlebars will produce the correct code in vue templates provided as optional frontend with the template - line 20 of vue template file

Copy link
Member

@icebob icebob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@icebob icebob merged commit bf2dabf into moleculerjs:master May 6, 2022
@icebob icebob linked an issue May 6, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing handlebars helper raw-helper
3 participants