Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Why does meanjs still use swig as https://github.com/paularmstrong/swig not suggest using it ? #1440

Closed
Ankur-Marwaha opened this issue Aug 21, 2016 · 13 comments

Comments

@Ankur-Marwaha
Copy link

Why does meanjs still use swig as https://github.com/paularmstrong/swig not suggest using it ?

Is there any alternative that i can use so that files that have use swig works fine as well ?

@hyperreality
Copy link
Contributor

Good point, it hasn't received an update in 2 years.

Could EJS be a possible alternative? https://github.com/mde/ejs . As far as I can see making the switch shouldn't be too painful.

@hyperreality
Copy link
Contributor

hyperreality commented Aug 21, 2016

Also Swig has at least one serious issue which Lirantal tried to chase down: paularmstrong/swig#649

@lirantal
Copy link
Member

Indeed.
We're considering to replace it with either nunjacks or handlebars.

@lirantal
Copy link
Member

@hyperreality I think ejs doesn't support nested templates, does it?

@hyperreality
Copy link
Contributor

hyperreality commented Aug 21, 2016

@lirantal Yeah, as far as I'm aware out of the box EJS doesn't support blocks, i.e. reusing parts of templates across different files. I've been looking at handlebars and think it's a much better choice for MEAN.js in any case.

@lirantal
Copy link
Member

Do you have a pro/con for handlebars vs nunjucks?

@lirantal
Copy link
Member

My bad, accidentally closed it :)

@lirantal lirantal reopened this Aug 21, 2016
@hyperreality
Copy link
Contributor

It's hard to make the call. As far as features go they're both fantastic. Nunjucks is more actively maintained but Handlebars is getting about 20 times the amount of downloads according to NPM, and I've seen Handlebars used way more in the wild. If nothing else, there is probably more info about Handlebars out there and users are more likely to be comfortable using it.

This may be a Buridan's ass situation where both choices are equally as good and the worst thing is being stuck in the state of indecision and not choosing either.

@Ankur-Marwaha
Copy link
Author

I wish the templating engine is changed very soon (may be handlebars), as I am new to meanjs and changing the template engine will be a pain in the ass.
Wishes do come true, right ?

@lirantal
Copy link
Member

Wishes do come true :)

@simison
Copy link
Member

simison commented Aug 22, 2016

It would be safe to close this and continue at #1286 ?

@Ankur-Marwaha
Copy link
Author

i prefer to keep it open, if you don't mind until the issue is resolved. As i am receiving email notifications from this.

@hyperreality
Copy link
Contributor

@Ankur-Marwaha you can go to issue #1286 and press Subscribe on the right to receive notifications there. It helps because we don't need several Github issues for the same problem.

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

No branches or pull requests

4 participants