-
Notifications
You must be signed in to change notification settings - Fork 69
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
Comiler function forgetting compiled version of template #96
Comments
Something like: this.compiled = function (template, callback) {
try {
var context = new TemplateContext();
var container = context.load(template);
callback(null, container);
}
catch (err) {
callback(err);
}
}; And usage: renderer.compiled('path/to/template', function (err, res) {
// do something with res.source
}); |
Why you dont Use:
Or what I miss to understand? |
I need compiled version of template not a rendered result |
ah, sorry. but its also possible todo:
|
I mean translate cofeescript to native javascript var template = '{{ if @a > 10: }}more then 10{{ end }}';
var compiled = '... if ( this.a > 10 ) { buf.push("more then 10") } ...'; |
You can compile ECT templates to JS with bundled cli tool (located in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need compiler function without http senders:
And amd loader without coffee-script dependencies for server-side compiling
The text was updated successfully, but these errors were encountered: