leonidas / transparency

Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
http://leonidas.github.com/transparency/
MIT License
969 stars 112 forks source link

jquery dep? and dom elements #64

Closed tj closed 12 years ago

tj commented 12 years ago

two questions, first being is there much coupling with jquery? or could you remove that? second question is if you have any interest in allowing passing of other dom nodes as well, we need to preserve bindings but other than that this lib looks nice. I would fork/patch but CS is lame

pyykkis commented 12 years ago

Yeah, support for passing DOM nodes has been a pending issue for a while, will do. See https://github.com/leonidas/transparency/issues/30 for the details.

Do you need support for IE8 or older? That's pain in the ass without jquery. I was planning to drop support (and jquery dep) in six months or something.

Giving it a second thought, I could do it right away and maintain a separate compatibility branch. That would also simplify the code quite a bit.

pyykkis commented 12 years ago

Just to clarify. Transparency requires jquery only when running on old IE browsers. Otherwise, it works fine without it.

tj commented 12 years ago

nope we dont need IE8

pyykkis commented 12 years ago

Finally done, see

https://github.com/leonidas/transparency/blob/master/spec/basics.spec.coffee#L141 https://github.com/leonidas/transparency/blob/master/src/transparency.coffee#L98

for the details.

Regarding the jQuery dependency, just ignore it. It's only needed for legacy browsers.

tj commented 12 years ago

nice! "other by Backbone views." -- pff :p not everyone uses that crap haha

pyykkis commented 12 years ago

Someone who uses it came up with detailed spec and implementation proposal at issue #30. That helps more than telling how hard coffeescript sucks :p

Anyways, point taken. The comment is inaccurate and doesn't clarify things - I throw it away.

tj commented 12 years ago

it just makes it difficult to contribute that's all, that's why I recommend that no one should use coffeescript in public javascript projects it doesn't make any sense