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

Improved web performance and size #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dleclere
Copy link

@dleclere dleclere commented Jun 7, 2012

I am currently working on a web application using eco templates for both the server and client. The plan is to pre-compile the templates using brunch and load keep them in the main build file. I just had a look at the minified output and I was horrified at what eco had done.

  • It pushes many meaningless lines to the output array,
  • preserves multiple recurrent white-spaces when just one white space would be appropriate,
  • and leaves html comments in... for fun?

So in light of this I modified the preprocessor and utilities slightly and corrected these issues.

Later I would like to modify eco further so that it didn't build a copy of its base functions into every template it rendered and instead shared some code brought in through a require. This would reduce the framework agnosticism presently enjoyed by eco, so I am going to have to think about it a little more...

@asyraf9
Copy link

asyraf9 commented Jun 8, 2012

bump this - do you have a repo i can look at? I'm also looking at moving out the eco base functions, and am also looking at putting them into someplace where you can also define custom global helpers that can be included into the template (just like __obj.safe and __obj.escape) and access the template's current context.

@Philipp15b
Copy link

I wanted to use eco for config file generation and I also need that whitespace fix to make it work properly. After all eco statements in the code newlines are inserted which makes the output very ugly. 👍 this.

@aeischeid
Copy link

bump, I'd really like to see this idea of cleaner compiled templates.

@mbhnyc
Copy link

mbhnyc commented May 27, 2013

this seems like a great PR — is eco still under active maintenance? is there a more active fork of this repo somewhere?

@mbhnyc
Copy link

mbhnyc commented Jun 5, 2013

bump. Want to take over @Philipp15b ?

@michaelficarra
Copy link

Has anybody tried pinging @sstephenson or anyone else listed as a maintainer directly? They may not be watching the project and may not be getting notified when someone comments.

@Philipp15b
Copy link

@mbhnyc Unfortunately, I'm not a user of eco anymore (partly due to the flaws mentioned above).

@mbhnyc
Copy link

mbhnyc commented Jun 5, 2013

What are people switching to, out of curiosity? The core feature of eco (embedded CS) I've enjoyed using quite a bit..!

@aeischeid
Copy link

haven't tried it out yet but have been keeping an eye on https://github.com/baryshev/ect

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

Successfully merging this pull request may close these issues.

6 participants