Skip to content

Commit 27e1c56

Browse files
committed
updated ractive to 0.8.5
1 parent 19d0ee0 commit 27e1c56

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed
File renamed without changes.

ractive-v0.7.3/index.html renamed to ractive-v0.8.5/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<title>Ractive v0.7.3</title>
4+
<title>Ractive v0.8.5</title>
55
<link href="../css/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
66
<link href="../css/main.css" rel="stylesheet"/>
77
</head>

ractive-v0.7.3/package.json renamed to ractive-v0.8.5/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
"url": "https://github.com/krausest/js-framework-benchmark.git"
1818
},
1919
"devDependencies": {
20-
"babel-core": "6.10.4",
21-
"babel-loader": "6.2.4",
22-
"babel-preset-es2015": "6.9.0",
23-
"webpack": "1.13.1"
20+
"babel-core": "6.18.2",
21+
"babel-loader": "6.2.8",
22+
"babel-preset-es2015": "6.18.0",
23+
"webpack": "1.13.3"
2424
},
2525
"dependencies": {
26-
"ractive": "0.7.3"
26+
"ractive": "0.8.5"
2727
}
2828
}

ractive-v0.7.3/src/main.es6.js renamed to ractive-v0.8.5/src/main.es6.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class DataStore {
5555
}
5656
add() {
5757
this.data.push.apply(this.data, this.buildData(1000));
58-
// this.data = this.data.concat(this.buildData(1000));
5958
}
6059
runLots() {
6160
this.data = this.buildData(10000);
@@ -77,7 +76,7 @@ class DataStore {
7776
const store = new DataStore();
7877

7978

80-
var ractive = new Ractive({
79+
var ractive = window.r = new Ractive({
8180
oninit : function(options) {
8281
const that = this;
8382
this.on( 'run', function ( event) {
@@ -104,11 +103,6 @@ var ractive = new Ractive({
104103
that.set("selected", store.selected);
105104
stopMeasure();
106105
});
107-
this.on('delete', function (event, id) {
108-
startMeasure("delete");
109-
store.delete(id);
110-
stopMeasure();
111-
});
112106
this.on('runLots', function (event) {
113107
startMeasure("runLots");
114108
store.runLots();
@@ -128,12 +122,22 @@ var ractive = new Ractive({
128122
stopMeasure();
129123
});
130124
},
125+
remove(idx) {
126+
startMeasure("delete");
127+
this.splice('store.data', idx, 1);
128+
stopMeasure();
129+
},
130+
select(id) {
131+
startMeasure("select");
132+
this.set("selected", id);
133+
stopMeasure();
134+
},
131135
el: "#main",
132136
template:
133137
`<div class="jumbotron">
134138
<div class="row">
135139
<div class="col-md-6">
136-
<h1>Ractive v0.7.3</h1>
140+
<h1>Ractive v0.8.5</h1>
137141
</div>
138142
<div class="col-md-6">
139143
<div class="row">
@@ -162,12 +166,12 @@ var ractive = new Ractive({
162166
<table class="table table-hover table-striped test-data">
163167
<tbody>
164168
{{#each store.data:num}}
165-
<tr class="{{ selected == id ? 'danger' : '' }}">
166-
<td class="col-md-1">{{id}}</td>
169+
<tr class-danger="{{~/selected === .id}}">
170+
<td class="col-md-1">{{.id}}</td>
167171
<td class="col-md-4">
168-
<a on-click="select:{{id}}">{{label}}</a>
172+
<a on-click="@this.select(.id)">{{label}}</a>
169173
</td>
170-
<td class="col-md-1"><a on-click="delete:{{id}}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></td>
174+
<td class="col-md-1"><a on-click="@this.remove(num)"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></td>
171175
<td class="col-md-6"></td>
172176
</tr>
173177
{{/each}}
File renamed without changes.

webdriver-ts/src/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export let frameworks = [
4545
f("polymer-v1.7.0", "polymer-v1.7.0", true),
4646
f("preact-v6.4.0"),
4747
f("simulacra-v1.5.5"),
48-
f("ractive-v0.7.3"),
48+
f("ractive-v0.8.5"),
4949
f("ractive-edge"),
5050
f("react-lite-v0.15.17"),
5151
f("react-v15.3.1"),

0 commit comments

Comments
 (0)