
A DOM building utility and Template engine based on JsonML with syntax sugar.
Checkout shaven.ad-si.com for extensive documentation.
shaven(
[document.body,
['h1#logo', 'Static Example'],
['p','Some example text'],
['ul#list.bullets',
['li', 'item1'],
['li.active', 'item2'],
['li',
['a', 'item3', {href: '#'}]
]
],
['em', 'Important', {
style: {
color: 'red',
'font-size': '2em',
},
}]
]
)
compiles to
<body>
<h1 id="logo">Static Example</h1>
Some example text
<ul id="list" class="bullets">
<li>item1</li>
<li class="active">item2</li>
<li><a href="#">item3</a></li>
</ul>
<em style="color:red;font-size:2em">Important</em>
</body>
In order to convert HTML fragments to shaven arrays html2shaven can be used.
npm install --save shaven
Check out shaven.ad-si.com for a detailed description of how to install shaven in other environments.
Earlier Firefox, Opera and Chrome versions have the same bug as Safari. That means even much older versions will just work fine under normal circumstances.
Check if code changes must be made in the server and browser version of shaven.
makenpm run prepublishv<version>)npm publishmake deploy$ claude mcp add shaven \
-- python -m otcore.mcp_server <graph>