Skip to content
One way data binding. Clean and simple.
HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
icons
src
test
.babelrc
.gitignore
CNAME
README.md
index.html
manifest.json
package.json

README.md

Dominero

One way data binding. Clean and simple.

https://dominero.alexlockhart.me

  1. Expressive - everything that Dominero does is visible in the markup
  2. Scoped to the provided elements
  3. Nesting of multiple root elements
  4. 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

  1. Update version in package.json
  2. Ensure the npm test test cases are all passing
  3. npm run build
  4. git commit the updated version number.
  5. npm publish
You can’t perform that action at this time.