node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Javascript MV* library with magical data bindings designed to be used with Webpack or Browserify.

In development - anything is about to change.


Currently there isn't a compiled version of the library. You need to have node.js installed.

npm install tesuji

However this version is ready to be used with Webpack and Browserify.


This example illustrates philosophy of tesuji.js, when used with Webpack.

File main.js:

var tesuji = require("tesuji");
var Model = tesuji.Model;
// create model class 
var MyModel = Model.extend(function(title, text) {
    this.title = title;
    this.text = text;
// with some method 
MyModel.prototype.changeText = function(newText) {
    this.text = newText;
// define main page model 
var pageModel = new Model({
    content: {
        template: require("./template.html"),
        model: new myModel("Hello World", "This is tesuji.js web app.")
// apply main model 

File template.html:

  <h1 data-text="m.title"></h1>
  <div data-text="m.text"></div>
  <button data-onclick="m.changeText('You clicked the button.')">Click me!</button>

File index.html:

<!doctype html>
<html lang="en">
    <script src="main.js"></script> 
    <div data-component="m.content"></div>

You can also check fully working TodoMVC app written in tesuji.js.