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

Export Jemplate in kernel.js #25

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

Conversation

buzzfeedjoe
Copy link

  • export Jemplate in kernel.js
  • update README with development tools and build details

This change was necessary to integrate Jemplate with spritesmith-cli, which can take an arbitrary templating engine for generating SCSS code. This specifically happens in the .spritesmith.js file which is documented here:

https://www.npmjs.org/package/spritesmith-cli

In order to include Jemplate into this config file, we need to require() it, as well as any templates we need to Jemplate to render. As it stands now, the Jemplate runtime does not export itself, even though the generated template files try to require it if exports is not defined:

https://github.com/ingydotnet/jemplate/blob/master/lib/Jemplate.pm#L401-L403

On a related note, I published an npm module for this modified Jemplate runtime (without Ajax or JSON support) so that it can be included as a dependency in our app:

https://www.npmjs.org/package/jemplate

If you have any feedback or questions, feel free to email me at joe.stanco@buzzfeed.com

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling cadc4b2 on buzzfeed:jemplate-with-exported-runtime into 8415719 on ingydotnet:master.

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