0.7.0 • Published 11 years ago

settee-templates v0.7.0

Weekly downloads
15
License
-
Repository
github
Last release
11 years ago

Settee.js

   ________
  (        )
 ()________()
 ||________||
 '          '

An s-expression template engine with no external dependencies.

Templates look like this:

(html
  (head
    (title "Hello")
    (script src="/js/my-app.js"))
  (body
    (article
      (section.main
        (p "Welcome to my site, " :name "!")))
    (aside.sidebar
        (ul
          (li
            (a href="/index.html" "Home"))))))

Use it like this:

var template= settee(source),
    html= template({ name:"Matt" })

It's great to drink coffee while lounging on the settee!

template= settee source
html= template name:"Matt"

Method Signature

As function:

settee( source:string )

Returns a #template function:

template( context:object )

Credits

S-Expression parser code based on:

http://code.google.com/p/javascript-lisp-interpreter/source/browse/lisp.js

0.7.0

11 years ago

0.6.0

11 years ago

0.5.1

12 years ago

0.5.0

12 years ago