e0c5ca03 by Michael Richards

Build 0.4.6.

1 parent b4365a7f
......@@ -2,8 +2,8 @@
"name": "rivets",
"repo": "mikeric/rivets",
"description": "Declarative data binding facility.",
"version": "0.4.5",
"keywords": ["data binding", "template"],
"version": "0.4.6",
"keywords": ["data binding", "templating"],
"scripts": ["lib/rivets.js"],
"main": "lib/rivets.js",
"license": "MIT"
......
// rivets.js
// version: 0.4.5
// version: 0.4.6
// author: Michael Richards
// license: MIT
(function() {
var Rivets, bindEvent, getInputValue, rivets, unbindEvent,
var Rivets, bindEvent, factory, getInputValue, unbindEvent,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__slice = [].slice,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
......@@ -480,7 +480,7 @@
return unbindEvent(el, 'change', this.currentListener);
},
routine: function(el, value) {
var o, _i, _len, _ref, _results;
var o, _i, _len, _ref, _ref1, _results;
if (el.type === 'select-multiple') {
if (value != null) {
_results = [];
......@@ -490,7 +490,7 @@
}
return _results;
}
} else {
} else if ((value != null ? value.toString() : void 0) !== ((_ref1 = el.value) != null ? _ref1.toString() : void 0)) {
return el.value = value != null ? value : '';
}
}
......@@ -581,11 +581,11 @@
Rivets.formatters = {};
rivets = {
binders: Rivets.binders,
formatters: Rivets.formatters,
config: Rivets.config,
configure: function(options) {
factory = function(exports) {
exports.binders = Rivets.binders;
exports.formatters = Rivets.formatters;
exports.config = Rivets.config;
exports.configure = function(options) {
var property, value;
if (options == null) {
options = {};
......@@ -594,8 +594,8 @@
value = options[property];
Rivets.config[property] = value;
}
},
bind: function(el, models) {
};
return exports.bind = function(el, models) {
var view;
if (models == null) {
models = {};
......@@ -603,13 +603,17 @@
view = new Rivets.View(el, models);
view.bind();
return view;
}
};
};
if (typeof module !== "undefined" && module !== null) {
module.exports = rivets;
if (typeof exports === 'object') {
factory(exports);
} else if (typeof define === 'function' && define.amd) {
define(['exports'], function(exports) {
return this.rivets = factory(exports);
});
} else {
this.rivets = rivets;
factory(this.rivets = {});
}
}).call(this);
......
{
"name" : "rivets",
"description" : "Declarative data binding facility.",
"version" : "0.4.5",
"version" : "0.4.6",
"author" : "Michael Richards",
"url" : "http://rivetsjs.com",
"main" : "./lib/rivets.js",
......
# rivets.js
# version : 0.4.5
# version : 0.4.6
# author : Michael Richards
# license : MIT
......