Rivets.js is a lightweight data binding and templating system that facilitates building data-driven views. Simply mutate properties at any depth on a bound object, and the UI updates automatically. This is achieved by subscribing to the individual junctions on keypaths directly. As mutations occur, the relevant binder functions are called to surgically update the specific DOM element.
It is entirely agnostic about the types of objects or other libraries you wish to use it with. Just define custom adapters for them as needed, or maybe someone already has.
<section id="auction">
<h2>{ auction.product.name }</h2>
<p>Current bid: { auction.currentBid | money user:settings.currency }</p>
<aside rv-if="auction.timeLeft | lt 120">
Hurry up! There is { auction.timeLeft | duration } left.
</aside>
</section>
rivets.bind($('#auction'), { auction, user })
Get started by reading the guide and refer to the reference for all included binders.
Additionally, you can find some community created binders as well as some example formatters and adapters in the wiki.
First, make sure to install any development dependencies.
$ npm install
Rivets.js uses gulp as its build tool. Run the following task to compile + minify the source into dist/.
$ gulp build
Rivets.js uses mocha as its testing framework, alongside should for expectations and sinon for spies, stubs and mocks. Run the following to run the full test suite.
$ npm test
dist/ as they will surely cause conflicts for others later. Files under dist/ are only committed when a new build is released.Overall
Maintained
Code review
npm
Latest release
Releases this year
2,409 followers · starred Aug 2013
259 followers · starred Nov 2014
4,104 followers · starred Apr 2012
488 followers · starred Apr 2012
Rivets.js is a lightweight data binding and templating system that facilitates building data-driven views. Simply mutate properties at any depth on a bound object, and the UI updates automatically. This is achieved by subscribing to the individual junctions on keypaths directly. As mutations occur, the relevant binder functions are called to surgically update the specific DOM element.
It is entirely agnostic about the types of objects or other libraries you wish to use it with. Just define custom adapters for them as needed, or maybe someone already has.
<section id="auction">
<h2>{ auction.product.name }</h2>
<p>Current bid: { auction.currentBid | money user:settings.currency }</p>
<aside rv-if="auction.timeLeft | lt 120">
Hurry up! There is { auction.timeLeft | duration } left.
</aside>
</section>
rivets.bind($('#auction'), { auction, user })
Get started by reading the guide and refer to the reference for all included binders.
Additionally, you can find some community created binders as well as some example formatters and adapters in the wiki.
First, make sure to install any development dependencies.
$ npm install
Rivets.js uses gulp as its build tool. Run the following task to compile + minify the source into dist/.
$ gulp build
Rivets.js uses mocha as its testing framework, alongside should for expectations and sinon for spies, stubs and mocks. Run the following to run the full test suite.
$ npm test
dist/ as they will surely cause conflicts for others later. Files under dist/ are only committed when a new build is released.Overall
Maintained
Code review
npm
Latest release
Releases this year
2,409 followers · starred Aug 2013
259 followers · starred Nov 2014
4,104 followers · starred Apr 2012
488 followers · starred Apr 2012