rivets

Lightweight and powerful data binding.

Github星跟踪图

Rivets.js

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.

Usage

<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})

Getting Started and Documentation

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.

Building and Testing

First install any development dependencies.

$ npm install

Building

Rivets.js uses gulp as its build tool. Run the following task to compile + minify the source into dist/.

$ gulp build

Testing

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

Contributing

Bug Reporting

  1. Ensure the bug can be reproduced on the latest master.
  2. Open an issue on GitHub and include an isolated JSFiddle demonstration of the bug. The more information you provide, the easier it will be to validate and fix.

Pull Requests

  1. Fork the repository and create a topic branch.
  2. Make sure not to commit any changes under dist/ as they will surely cause conflicts for others later. Files under dist/ are only committed when a new build is released.
  3. Include tests that cover any changes or additions that you've made.
  4. Push your topic branch to your fork and submit a pull request. Include details about the changes as well as a reference to related issue(s).

主要指标

概览
名称与所有者mikeric/rivets
主编程语言JavaScript
编程语言JavaScript (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2012-04-18 21:54:51
推送于2020-04-06 19:49:14
最后一次提交2016-10-22 11:06:22
发布数88
最新版本名称v0.9.6 (发布于 2016-10-22 10:59:36)
第一版名称v0.1.0 (发布于 2012-07-12 22:25:41)
用户参与
星数3.2k
关注者数81
派生数308
提交数779
已启用问题?
问题数489
打开的问题数118
拉请求数156
打开的拉请求数24
关闭的拉请求数69
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?