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 CommonJS export option for template compilation. #371

Merged
merged 1 commit into from
Nov 25, 2012

Conversation

cpojer
Copy link
Contributor

@cpojer cpojer commented Nov 22, 2012

This change allows to export the compiled Templates as CommonJS by specifying the module name of the Handlebars runtime.

Example:

bin/handlebars -c "HandlebarsRuntime" […]

results in the following Output:

var Handlebars = require('HandlebarsRuntime');

[...] // compiled Templates

This is useful when working in a CommonJS Context :)

kpdecker added a commit that referenced this pull request Nov 25, 2012
Add CommonJS export option for template compilation.
@kpdecker kpdecker merged commit bd04901 into handlebars-lang:master Nov 25, 2012
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