ejs-html
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -0,1 +1,4 @@ | ||
# 3.0.1 | ||
* Fixed: npm.js does not render tabs on README correctly | ||
# 3.0.0 | ||
@@ -2,0 +5,0 @@ |
{ | ||
"name": "ejs-html", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"author": "Sitegui <sitegui@sitegui.com.br>", | ||
@@ -5,0 +5,0 @@ "description": "Embedded JavaScript HTML templates. An implementation of EJS focused on run-time performance, HTML syntax checking, minified HTML output and custom HTML elements.", |
@@ -15,4 +15,4 @@ # EJS HTML | ||
let html = ejs.render('<input type="text" disabled="<%=disabled%>" value="<%=value%>" />', { | ||
disabled: false, | ||
value: 'hi you' | ||
disabled: false, | ||
value: 'hi you' | ||
}) | ||
@@ -61,12 +61,12 @@ | ||
var render = ejs.compile('<i>Hi</i> <p><i>Deep</i></p>', { | ||
transformer: function translate(tokens) { | ||
tokens.forEach(token => { | ||
if (token.type === 'element') { | ||
if (token.name === 'i') { | ||
token.name = 'em' | ||
} | ||
translate(token.children) | ||
} | ||
}) | ||
} | ||
transformer: function translate(tokens) { | ||
tokens.forEach(token => { | ||
if (token.type === 'element') { | ||
if (token.name === 'i') { | ||
token.name = 'em' | ||
} | ||
translate(token.children) | ||
} | ||
}) | ||
} | ||
}) | ||
@@ -83,15 +83,15 @@ | ||
<div class="dialog"> | ||
<div class="dialog-title"> | ||
<%= title %> | ||
<% if (closable) { %> | ||
<div class="dialog-close">X</div> | ||
<% } %> | ||
</div> | ||
<eh-placeholder> | ||
<!-- dialog content goes here --> | ||
</eh-placeholder> | ||
<div class="dialog-buttons"> | ||
<button class="dialog-yes">Yes</button> | ||
<button class="dialog-no">No</button> | ||
</div> | ||
<div class="dialog-title"> | ||
<%= title %> | ||
<% if (closable) { %> | ||
<div class="dialog-close">X</div> | ||
<% } %> | ||
</div> | ||
<eh-placeholder> | ||
<!-- dialog content goes here --> | ||
</eh-placeholder> | ||
<div class="dialog-buttons"> | ||
<button class="dialog-yes">Yes</button> | ||
<button class="dialog-no">No</button> | ||
</div> | ||
</div> | ||
@@ -103,3 +103,3 @@ ``` | ||
<custom-dialog title="Wanna Know?" closable> | ||
<em>HTML</em> Content | ||
<em>HTML</em> Content | ||
</custom-dialog> | ||
@@ -106,0 +106,0 @@ ``` |
45097