Skip to content

Commit 9ac6d31

Browse files
committed
Merge branch 'master' of https://github.com/IanDxSSXX/js-framework-benchmark into IanDxSSXX-master
2 parents 2f86b81 + f3650bc commit 9ac6d31

File tree

8 files changed

+346
-80
lines changed

8 files changed

+346
-80
lines changed

frameworks/keyed/dlightjs/package-lock.json

Lines changed: 153 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/dlightjs/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
"url": "https://github.com/dlight-js/dlight.git"
1919
},
2020
"dependencies": {
21-
"@dlightjs/dlight": "0.9.2"
21+
"@dlightjs/dlight": "^0.10.2"
2222
},
2323
"devDependencies": {
24+
"babel-preset-dlight": "^0.10.5",
2425
"@babel/core": "7.15.0",
26+
"@babel/plugin-proposal-class-properties": "^7.18.6",
27+
"@babel/plugin-proposal-decorators": "^7.23.0",
2528
"@rollup/plugin-babel": "5.3.0",
2629
"@rollup/plugin-node-resolve": "13.0.4",
27-
"babel-preset-dlight": "0.9.2",
2830
"rollup": "2.52.3",
2931
"rollup-plugin-terser": "7.0.2"
3032
}

frameworks/keyed/dlightjs/rollup.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ const plugins = [
66
babel({
77
babelHelpers: "bundled",
88
exclude: "node_modules/**",
9-
presets: ["dlight"],
9+
presets: ["dlight"]
10+
}),
11+
babel({
12+
babelHelpers: "bundled",
13+
exclude: "node_modules/**",
14+
plugins: [
15+
["@babel/plugin-proposal-decorators", { version: "legacy" }],
16+
["@babel/plugin-proposal-class-properties", { loose: true }]
17+
]
1018
}),
1119
resolve({ extensions: [".js"] }),
1220
]

frameworks/keyed/dlightjs/src/main.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import DLight, { View, render } from "@dlightjs/dlight"
1+
import { View, render } from "@dlightjs/dlight"
22

33
let idCounter = 1
44

@@ -19,7 +19,8 @@ function buildData(count) {
1919
return data
2020
}
2121

22-
class Main extends View {
22+
@View
23+
class Main {
2324
rows = []
2425
selectIdx = -1
2526
addRows() {
@@ -62,19 +63,19 @@ class Main extends View {
6263
this.rows = [...this.rows]
6364
}
6465

65-
@SubView
66-
Button({ _$content, id, onclick }) {
66+
@View
67+
Button({ content, id, onclick }) {
6768
div()
6869
.className("col-sm-6 smallpad")
6970
{
70-
button(_$content)
71+
button(content)
7172
.onclick(onclick)
7273
.id(id)
7374
.className("btn btn-primary btn-block")
7475
}
7576
}
7677

77-
@SubView
78+
@View
7879
Jumbotron() {
7980
div()
8081
.className("jumbotron")

0 commit comments

Comments
 (0)