estml
v0.0.1
Published
Render html ES6 way :)
Readme
ES TML
Install
npm i estmlUsage
const T = require('estml')Simple tag with no attribute
T('br')toString result
<br>Simple tag with attribute
T('span', {class: 'foo'})toString result
<span class="foo"></span>Simple tag with inner html
T('h1')`TITLE!`result
<h1>TITLE!</h1>Self closing tag
T('foo-component/')toString result
<foo-component/>Mixed example
T('div')`
${T('input', {type: 'text', class: 'foo'})}
Foo Text${T('br')}
${T('div')`
inside div
${T('foo-component/')}
`}
`result
<div>
<input type="text" class="foo">
Foo Text<br>
<div>
inside div
<foo-component/>
</div>
</div>What is the benefit of using this?
Nothing.
Just read the code and have fun :)
