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

Added Handlebars preview #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added Handlebars preview #136

wants to merge 1 commit into from

Conversation

chaliy
Copy link

@chaliy chaliy commented Feb 6, 2017

#35 Added Handlebars support

P.S. I treat this pull request as step towards to #36 (supporting fake data for generation)

render: (text, filepath, cb) ->
Handlebars = allowUnsafeNewFunction -> allowUnsafeEval -> require 'handlebars'
template = allowUnsafeNewFunction -> allowUnsafeEval ->
Handlebars.compile text
Copy link
Collaborator

@nemoDreamer nemoDreamer Oct 1, 2018

Choose a reason for hiding this comment

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

@chaliy I searched the Handlebars API and can't find whether compile would throw on faulty syntax. Is this a case you need to account for?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@chaliy are you still interested in looking into this?

Copy link
Collaborator

@nemoDreamer nemoDreamer left a comment

Choose a reason for hiding this comment

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

One quick thing (in addition to checking graceful failure): could you add a quick handlebar template example to /spec/samples? Thanks!

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.

2 participants