Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Reduce code duplication with multiple compiled eco templates #54

Open
Philipp15b opened this issue Aug 4, 2012 · 3 comments
Open

Reduce code duplication with multiple compiled eco templates #54

Philipp15b opened this issue Aug 4, 2012 · 3 comments

Comments

@Philipp15b
Copy link

So I wanted to use eco client-side and I noticed that eco pre-compiles all the helper functions in every single one of the compiled templates.

This could be solved by maybe allowing the compiler to use a global eco object which would then contain the helpers.

This was also mentioned in #48.

@al6x
Copy link

al6x commented Aug 8, 2012

Yes, would be nice to prevent it, maybe something like

eco = require 'eco'

bundle = [
  eco.head()
  eco.precompileWithoutHead(tmpl1)
  eco.precompileWithoutHead(tmpl2)
  ....
].join("; \n")

@aeischeid
Copy link

+1 for this optimization! We just noticed this duplication as well, and were immediately looking for a way to cut it out, but got lost in the details of why it is there in the first place.

@al6x
Copy link

al6x commented Oct 2, 2012

Any news for this? At least is this feature will be accepted or rejected?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants