goat-node
Another Express view engine
$ npm install goat-node
(GOAT == 'Greatest of All Time') ? 'No..'
$ node example-app
for a quick example..
We were feeding goats at the petting zoo, and I thought about feeding data to an HTML template.
First of all, some reasons why another view/templating engine was worth a short time to put together.
Frankly, it gets no more straight-forward than,
Hello , how are you..
I don't use because unlike some people I don't like to type
NO template engine to reference or load, by the way..
Templating is just that, except usually with a strange new syntax to learn.
(The quality of which is entirely subjective by the way..)
Now,
Jade is good. Very nice. Terse == lovely. I wasn't crazy about having to
learn it (Markdown either, as you can tell by the (!lovelyness) of my README),
After some practice I can sort-of get stuff done. BUT I use two environments, Nodejs and PHP v5.2.
Jade for PHP v5.3> only, so says Mr. Google. :( I'm not upgrading my PHP right now.
Need something more old-school compatible.
Templates for every template engine I could find are not valid HTML. (Except Plates I believe)
Something just icky about that. I want to match on Div ids ala Plates.
Small modules - not many features == good.
Logic, programming constructs in the template, wrong in both the academic and real worlds.
Custom syntaxes == more stuff to learn.
Expressjs styley..
app.js
var express = app = ; app;app;app; appall'/index.html' { // the template handles values and arrays only.. otherwise I gotta work thru dinnertime.. res var port = processenvPORT || 3000;app
index.html
nameage
Should result in..
Hello worlds! nameage chris 42 paris 32
That's what I want.. and according to my wholly inadequate testing, that's what I now have..