0.4.6 • Published 8 years ago

tesuji v0.4.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

tesuji.js

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

In development - anything is about to change.

Install

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.

Example

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
tesuji.applyModel(pageModel);

File template.html:

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

File index.html:

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

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

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.8

9 years ago

0.2.7

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago