-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 consolidate to make template engine configurable #236
Conversation
yeah I think consolidate sounds good as a wrapper for templating and I'd definitely go for swig as the default. |
@lirantal do you want to do the swig migration? or should I give it a go? |
Hi guys,
|
@liorkesos The top 2 template engines on from Paul's list |
@fyockm I'm all up for Swig, you're welcome to go ahead and update your pull request with a change for using it as the default. Guys, I've been working with both Swig and AngularJS for a short while now and the only comment I have so far is that Swig uses the same curly braces {{ }} notation which means that if you create a server side template which angular is supposed to use and you intend the curly braces to be used by angular then that won't work because Swig, on the server side, will evaluate the curly braces first. What I did on the projects I'm working on is to use Swig's {% raw %} handler so that it doesn't attempt to evaluate the block that's inside it. It's not the cleanest way to go, probably the better approach is to simply include angular templates instead of writing them directly in the server templates. Another option is to change angular's curly braces notation from {{ }} to [[ ]] which is definitely an easy way out but I fear its somewhat annoying and confusing. |
@lirantal @liorkesos |
I'm currently getting messages complaining of missing mongoose and warnings about ..
|
@liorkesos |
use consolidate to make template engine configurable
@liorkesos Thanks! |
Step 1 in making the template engine configurable, use consolidate.js. I don't really like how the file extensions are named now, with some as
.html
and others as.jade
. Need to think on that topic a little more. Might make sense to update the directory structure to split the file types.@lirantal could be good to give
swig
a try instead ofjade
, as that might help with the extension problem.