0.1.0 • Published 7 years ago

dragon-engine v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

dragon

dragon es un pequeño motor de plantilla, que consta de funcionales como control de flujo, incluir y extender plantillas, manejando la indentacion al abrir y cerrar etiquetas dragon. funciona tanto como para Node.js y navegadores

Installation

via npm

$ npm install dragon-engine

Syntax

the dragon templates are handled by indentation

<div>
    <? if str instanceof String ?>
        <p>my indented content</p>
    <? else ?>
        <p>not string</p>
    <? endif ?>
</div>

output

<div>
        <p>my indented content</p>
</div>

Usage

var html = dragon.compile(/*html*/'<?= str ?>', /*data*/ {
    str: 'hello'
});

License

MIT