Rivets.js is a lightweight data binding and templating system that facilitates building data-driven views. It is agnostic about every aspect of a front-end MV(C|VM|P) stack, making it easy to introduce it into your current workflow or to use it as part of your own custom front-end stack comprised of other libraries.
<section id="auction">
<h3>{ auction.product.name }</h3>
<p>Current bid: { auction.currentBid | money }</p>
<aside rv-if="auction.timeLeft | lt 120">
Hurry up! There is { auction.timeLeft | time } left.
</aside>
</section>
rivets.bind($('#auction'), {auction: auction})
Documentation is available on the homepage. Learn by reading the Guide and refer to the Binder Reference to see what binders are available to you out-of-the-box.
First 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.