README
Dominero
One way data binding. Clean and simple.
https://dominero.alexlockhart.me
- Expressive - everything that Dominero does is visible in the markup
- Scoped to the provided elements
- Nesting of multiple root elements
- Named data bound attributes so the same object property name can update different element attributes.
Installation
npm install dominero
Usage
https://codepen.io/megazear7/pen/WPxojQ
<div class="container1">
<h1 data-dominero-title>Default Title 1</h1>
<p data-dominero-description>Default Description 1</p>
</div>
<div class="container2">
<h1 data-dominero-title>Default Title 2</h1>
<p data-dominero-description>Default Description 2</p>
</div>
import dominero from 'dominero';
const container1 = dominero(document.querySelector('.container1'), {
title: "Hello, World!",
description: "Scoped one way data binding is all a go!"
});
const container2 = dominero(document.querySelector('.container2'), {
description: "Another scope of one way data binding"
});
container2.title = "I was updated";
For more documentation refer to the documentation.
Distribution
For ES5 use the "dist/index-es5.js" file. Otherwise use the ES6 module located in the "dist/index.js" file.
Testing
npm test
Build new release
- Update version in package.json
- Ensure the
npm test
test cases are all passing npm run build
git commit
the updated version number.npm publish