myme / elvis

Generate HTML DOM programmatically
http://github.com/myme/elvis
ISC License
2 stars 1 forks source link

Elvis

Latest npm version Number of npm downloads Build Status

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="https://github.com/myme/elvis/blob/master/")',     'Home')),
    el('li', el('a(href="https://github.com/myme/elvis/blob/master/news")', 'News')),
    ...
  ])),
  el('#contents', [
    el('span.my-class', 'Hello, World!')
  ])
]);

Release notes

v1.0.4 (2016-05-10)

v1.0.3 (2015-06-01)

v1.0.0 (2015-05-29)

v0.3.1 (2014-02-24)

v0.3.0 (2014-02-03)

v0.2.7 (2014-01-06)

v0.2.6 (2013-11-11)

v0.2.5

v0.2.4

v0.2.3

v0.2.2

v0.2.1

v0.2.0

v0.1.1

v0.1.0

Perform release