Elvis is a JavaScript library for creating and building DOM elements programmatically. It does this using native, cross-browser APIs (createElement
et al). Elvis works like a template library, except without having to compile templates from strings. DOM generating code must also be valid JavaScript, and it really shines when used with a transpiled language like CoffeeScript. It is inspired by template languages like Jade and HAML.
var el = elvis;
el(document.body, [
el('nav', el('ul', [
el('li', el('a(href="/")', 'Home')),
el('li', el('a(href="/news")', 'News')),
...
])),
el('#contents', [
el('span.my-class', 'Hello, World!')
])
]);
- Update elvis-backbone for better CommonJS support
- Restructure project to allow for separate elvis and elvis-backbone modules.
- Make elvis npm compatible
- Call transform function with proper context
- Handle
number
andboolean
types equal tostring
- Add support for setting
style
attributes directly and with bindings
- Add
.bindTo
to Backbone Views
- Fix #10 - Several Internet Explorer 8 issues
- Add support for "safe" strings which are not escaped
- Flatten out nested arrays passed as child elements
- Add support for boolean attributes
- Change Backbone.Model API to use
.get
and.set
for the transform registration methods
- Add Backbone.Model data-binding plugin
- Proper handling of
value
attribute - Add event listener function
el.on
- Add plugin for Backbone.Model support
- Minor bug fixes
- Fix issue with adding child nodes
- Initial release
- Update
Release notes
- Bump
package.json
andbower.json
version numbers (also in elvis/ + elvis-backbone/) - Run
npm run-script build
to update all distribution sources git tag -a <tag>
with the appropriate version numbernpm publish
in both elvis/ + elvis-backbone/