exkited is a template language created in 2018 by Brandon Barber.
#1952on PLDB | 6Years Old |
git clone https://github.com/maelswarm/exkited
A minimalistic templating language that lets you generate markup with JavaScript.
<html>
<div class="title">
<@ return data.title @> // A 'data' object may be passed rendering.
</div>
<@
let result = '';
for(let x=0;x<10;x++) {
for(let i=0;i<4;i++) {
for(let j=0;j<4;j++){
result += `<div>@{i+j}</div>`;
}
}
}
return result;
@>
<div class="average-price">
<@ return data.prices.reduce((accum, val) => accum += val) / data.prices.length; @>
</div>
<div class="day-of-week">
<@
switch(data.dayIdx) {
case 0:
return 'Sunday';
case 1:
return 'Monday';
case 2:
return 'Tuesday';
case 3:
return 'Wednesday';
case 4:
return 'Thursday';
case 5:
return 'Friday';
case 6:
return 'Saturday';
}
@>
</div>
</html>