ランキングに戻る

mikeric/rivets

JavaScript

A lightweight data binding library.

javascriptcoffeescriptdatabindingtemplate-engine
スター成長
スター
3.2k
フォーク
301
週間成長
Issue
118
1k2k3k
2023年1月2024年3月2025年5月2026年7月
成果物npmnpm install rivets
README

Rivets.js

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.

DX

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

Documentation

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.

Build

First, make sure to 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).
関連リポジトリ
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

TypeScriptnpmBSD 3-Clause "New" or "Revised" Licenselearn-to-codenonprofits
contribute.freecodecamp.org
452.4k45.6k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPIMIT Licensetutorialproject
274.6k35.4k
react/react

The library for web and native user interfaces.

JavaScriptnpmMIT Licensejavascriptreact
react.dev
246.7k51.3k
facebook/react

The library for web and native user interfaces.

JavaScriptnpmMIT Licensejavascriptreact
react.dev
233k47.8k
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

TypeScriptnpmMIT Licensevuejavascript
v2.vuejs.org
210.1k33.8k
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

JavaScriptnpmMIT Licensejavascriptalgorithms
196.3k31k
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

Otherbook-seriesjavascript
amazon.com/dp/B085XXCJ7X
184.6k33.5k
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

MDXMIT Licensecssbootstrap
getbootstrap.com
174.5k78.7k
airbnb/javascript

JavaScript Style Guide

JavaScriptnpmMIT Licensejavascripteslint
148.1k26.6k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
128.5k12.5k
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

C++MIT Licenseelectronjavascript
electronjs.org
122.1k17.3k
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

JavaScriptnpmOthernodejsjavascript
nodejs.org
118.4k36.2k