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

Use template-literal instead of EJS #53

Open
Drulac opened this issue Jan 7, 2018 · 2 comments
Open

Use template-literal instead of EJS #53

Drulac opened this issue Jan 7, 2018 · 2 comments

Comments

@Drulac
Copy link

Drulac commented Jan 7, 2018

Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.

It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS 😀

@jcoppieters
Copy link
Owner

jcoppieters commented Jan 8, 2018 via email

@Drulac
Copy link
Author

Drulac commented Jan 8, 2018

I'm looking to create include possibility without decrease a lot of performance :-)

for loops you can do this :

 /////////////<%include ../navigation.ejs%>///////////still not good included
<table>
     ${candlist.map(cand=>`
          <tr>
               <td>${cand.count}</td>
               <td>${candl.firstname} ${cand.name}</td>
          </tr>
     `).join('\n')}
</table>

enjoy :-)

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

No branches or pull requests

2 participants