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
numberandbooleantypes equal tostring
- Add support for setting
styleattributes directly and with bindings
- Add
.bindToto 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
.getand.setfor the transform registration methods
- Add Backbone.Model data-binding plugin
- Proper handling of
valueattribute - 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.jsonandbower.jsonversion numbers (also in elvis/ + elvis-backbone/) - Run
npm run-script buildto update all distribution sources git tag -a <tag>with the appropriate version numbernpm publishin both elvis/ + elvis-backbone/