0.2.2 • Published 4 years ago

stir-template v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Stir template

A string-based HTML template library inspired by React.

Usage

npm i --save-dev stir-template

or

yarn add --dev stir-template

Methods:

stir.render
stir.createElement
stir.createFactory

Predefined:

stir.doctype
stir.html
stir.head
stir.body
stir.title

stir.link
stir.meta
stir.script

stir.div
stir.span
stir.a
stir.code
stir.input
stir.textarea

Example in CoffeeScript:

{html, head, body, div} = stir

link = stir.createFactory 'link'
script = stir.createFactory 'script'

module.exports = (data) ->
  stir.render stir.doctype,
    html null,
      head null,
        link()
        script()
      body null,
        div name: 'a', 'empty'
        div()

Difference from React

stir-template does not escape DOM properties(which React does). Object properties are directly rendered to DOM properties.

License

MIT

0.2.2

4 years ago

0.2.2-a1

4 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

10 years ago