Skip to content

Commit cc3ce5f

Browse files
committed
domvm v3.3.1
1 parent 3654d8e commit cc3ce5f

File tree

11 files changed

+65
-29
lines changed

11 files changed

+65
-29
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
const rollup = require('rollup').rollup;
22
const buble = require('rollup-plugin-buble');
3-
const uglify = require('rollup-plugin-uglify');
3+
const closure = require('rollup-plugin-closure-compiler-js');
4+
const resolve = require('rollup-plugin-node-resolve');
45
const commonjs = require('rollup-plugin-commonjs');
56

67
rollup({
78
input: 'src/main.es6.js',
89
plugins: [
10+
resolve(),
911
commonjs(),
1012
buble(),
11-
uglify(),
13+
closure({
14+
rewritePolyfills: false
15+
}),
1216
]
13-
}).then(bundle => bundle.write({
17+
})
18+
.then(bundle => bundle.write({
1419
file: 'dist/bundle.js',
1520
format: 'iife'
16-
})).catch(err => console.log(err.stack));
21+
}))
22+
.catch(err => console.log(err.stack));
File renamed without changes.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-domvm-keyed",
3-
"version": "3.2.4-keyed",
3+
"version": "3.3.1-keyed",
44
"description": "Benchmark for domvm framework (keyed)",
55
"scripts": {
66
"build-dev": "node build.js",
@@ -9,10 +9,12 @@
99
"devDependencies": {
1010
"rollup": "*",
1111
"rollup-plugin-buble": "*",
12+
"rollup-plugin-node-resolve": "*",
1213
"rollup-plugin-commonjs": "*",
13-
"rollup-plugin-uglify": "*"
14+
"rollup-plugin-closure-compiler-js": "*",
15+
"google-closure-compiler-js": "*"
1416
},
1517
"dependencies": {
16-
"domvm": "^3.2.4"
18+
"domvm": "git://github.com/leeoniya/domvm.git#3.3.1"
1719
}
1820
}

domvm-v3.2.4-keyed/src/main.es6.js renamed to domvm-v3.3.1-keyed/src/main.es6.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import domvm from '../node_modules/domvm/dist/nano/domvm.nano.min.js';
1+
import {
2+
createView,
3+
defineElement,
4+
defineView,
5+
FIXED_BODY,
6+
KEYED_LIST,
7+
LAZY_LIST,
8+
lazyList
9+
} from '../node_modules/domvm/dist/nano/domvm.nano.es.js';
10+
11+
const h = (tag, arg1, arg2) => defineElement(tag, arg1, arg2, FIXED_BODY);
12+
const v = defineView;
13+
214
import {Store} from './store.es6';
315

4-
const h = (tag, arg1, arg2) => domvm.defineElement(tag, arg1, arg2, domvm.FIXED_BODY);
5-
const v = domvm.defineView;
616
const store = new Store();
717

8-
domvm.createView(App).mount(document.body);
18+
createView(App).mount(document.body);
919

1020
function App(vm) {
1121
return _ =>
@@ -89,13 +99,13 @@ function Table(vm) {
8999
};
90100

91101
return _ => {
92-
var items = domvm.lazyList(store.data, {
102+
var items = lazyList(store.data, {
93103
key: item => item.id,
94104
diff: item => [item.label, item.id === store.selected],
95105
});
96106

97107
return h("table.table.table-hover.table-striped.test-data", {onclick: tableClick}, [
98-
h("tbody", {_flags: domvm.LAZY_LIST | domvm.KEYED_LIST}, items.map(item =>
108+
h("tbody", {_flags: LAZY_LIST | KEYED_LIST}, items.map(item =>
99109
h("tr", {_key: item.id, class: item.id === store.selected ? 'danger' : null}, [
100110
h("td.col-md-1", item.id),
101111
h("td.col-md-4", [
File renamed without changes.
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
const rollup = require('rollup').rollup;
22
const buble = require('rollup-plugin-buble');
3-
const uglify = require('rollup-plugin-uglify');
3+
const closure = require('rollup-plugin-closure-compiler-js');
4+
const resolve = require('rollup-plugin-node-resolve');
45
const commonjs = require('rollup-plugin-commonjs');
56

67
rollup({
78
input: 'src/main.es6.js',
89
plugins: [
10+
resolve(),
911
commonjs(),
1012
buble(),
11-
uglify(),
13+
closure({
14+
rewritePolyfills: false
15+
}),
1216
]
13-
}).then(bundle => bundle.write({
17+
})
18+
.then(bundle => bundle.write({
1419
file: 'dist/bundle.js',
1520
format: 'iife'
16-
})).catch(err => console.log(err.stack));
21+
}))
22+
.catch(err => console.log(err.stack));
File renamed without changes.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "js-framework-benchmark-domvm-keyed",
3-
"version": "3.2.4-non-keyed",
2+
"name": "js-framework-benchmark-domvm-non-keyed",
3+
"version": "3.3.1-non-keyed",
44
"description": "Benchmark for domvm framework (non-keyed)",
55
"scripts": {
66
"build-dev": "node build.js",
@@ -9,10 +9,12 @@
99
"devDependencies": {
1010
"rollup": "*",
1111
"rollup-plugin-buble": "*",
12+
"rollup-plugin-node-resolve": "*",
1213
"rollup-plugin-commonjs": "*",
13-
"rollup-plugin-uglify": "*"
14+
"rollup-plugin-closure-compiler-js": "*",
15+
"google-closure-compiler-js": "*"
1416
},
1517
"dependencies": {
16-
"domvm": "^3.2.4"
18+
"domvm": "git://github.com/leeoniya/domvm.git#3.3.1"
1719
}
1820
}

domvm-v3.2.4-non-keyed/src/main.es6.js renamed to domvm-v3.3.1-non-keyed/src/main.es6.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import domvm from '../node_modules/domvm/dist/nano/domvm.nano.min.js';
1+
import {
2+
createView,
3+
defineElement,
4+
defineView,
5+
FIXED_BODY,
6+
KEYED_LIST,
7+
LAZY_LIST,
8+
lazyList
9+
} from '../node_modules/domvm/dist/nano/domvm.nano.es.js';
10+
11+
const h = (tag, arg1, arg2) => defineElement(tag, arg1, arg2, FIXED_BODY);
12+
const v = defineView;
13+
214
import {Store} from './store.es6';
315

4-
const h = (tag, arg1, arg2) => domvm.defineElement(tag, arg1, arg2, domvm.FIXED_BODY);
5-
const v = domvm.defineView;
616
const store = new Store();
717

8-
domvm.createView(App).mount(document.body);
18+
createView(App).mount(document.body);
919

1020
function App(vm) {
1121
return _ =>
@@ -89,12 +99,12 @@ function Table(vm) {
8999
};
90100

91101
return _ => {
92-
var items = domvm.lazyList(store.data, {
102+
var items = lazyList(store.data, {
93103
diff: item => [item.label, item.id === store.selected, item.id],
94104
});
95105

96106
return h("table.table.table-hover.table-striped.test-data", {onclick: tableClick}, [
97-
h("tbody", {_flags: domvm.LAZY_LIST}, items.map(item =>
107+
h("tbody", {_flags: LAZY_LIST}, items.map(item =>
98108
h("tr", {_data: item.id, class: item.id === store.selected ? 'danger' : null}, [
99109
h("td.col-md-1", item.id),
100110
h("td.col-md-4", [
File renamed without changes.

0 commit comments

Comments
 (0)