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

Fix: Jade plugin extension functionality #15

Merged
merged 1 commit into from
Dec 28, 2015
Merged

Fix: Jade plugin extension functionality #15

merged 1 commit into from
Dec 28, 2015

Conversation

sch
Copy link
Collaborator

@sch sch commented Dec 27, 2015

Currently, the function that creates the Jade render function is always being called with an extension template value of null. This change fixes the call site of createRenderer to pass the compile settings object and the extension template to the Jade compiler.

I also made some naming changes, as I was getting confused about our terminology vs the Jade terminology — namely createTemplatecreateRenderer, since that's how the Jade api refers to it.

@jasonkuhrt
Copy link
Collaborator

@sch Thanks for putting this together! I have few questions but generally looks great. Lets get this merged soon.


const template = createTemplate(config.templateExtension)
const render = createRenderer(config.jade, config.templateExtension)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here we are adding a new config field jade to allow the user to customize jade's compile options, right? However I believe this is what the existing option compile was for. If I am right about your intention here then I think we should revise this code to be config.compile [1].

[1] The field name may be questionable but lets keep that for a different issue so that we can relegate this PR to a bug fix with no interface change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh, thanks — I wasn't sure if you were thinking that would be reserved for the Webpack compiler or the Jade compiler. Updated!

Currently, the function that creates the Jade render function is always being
called with an extension template value of `null`. This change fixes the call
site to pass the `compiler` settings object and the extension template to the
Jade `createRenderer` function.
jasonkuhrt added a commit that referenced this pull request Dec 28, 2015
…mpiler-settings

Fix: Jade plugin extension functionality
@jasonkuhrt jasonkuhrt merged commit d1abe15 into jasonkuhrt-archive:master Dec 28, 2015
@jasonkuhrt
Copy link
Collaborator

Thanks again!

@jasonkuhrt
Copy link
Collaborator

I will cut a release later today when I'm at my computer proper.

@jasonkuhrt
Copy link
Collaborator

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.

None yet

2 participants