Skip to content

Commit 364ebb9

Browse files
committed
Merge branch 'master' of github.com:krausest/js-framework-benchmark
2 parents b253f8c + d36af04 commit 364ebb9

38 files changed

+4292
-4275
lines changed

frameworks/keyed/1more/package-lock.json

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

frameworks/keyed/1more/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
"name": "js-framework-benchmark-1more",
33
"version": "0.1.18",
44
"description": "1more demo",
5+
"type": "module",
56
"main": "dist/app.min.js",
67
"js-framework-benchmark": {
78
"frameworkVersionFromPackage": "1more",
89
"frameworkHomeURL": "https://github.com/Freak613/1more"
910
},
1011
"scripts": {
1112
"build-dev": "rollup -c -w",
12-
"build-prod": "rollup -c"
13+
"build-prod": "rollup -c --environment production"
1314
},
1415
"keywords": [
1516
"1more"
@@ -22,9 +23,9 @@
2223
"url": "https://github.com/krausest/js-framework-benchmark.git"
2324
},
2425
"devDependencies": {
25-
"rollup": "^0.58.2",
26-
"rollup-plugin-node-resolve": "^3.3.0",
27-
"rollup-plugin-terser": "^1.0.1"
26+
"@rollup/plugin-node-resolve": "^15.1.0",
27+
"@rollup/plugin-terser": "^0.4.3",
28+
"rollup": "^3.26.3"
2829
},
2930
"dependencies": {
3031
"1more": "0.1.18"
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
"use strict";
1+
import resolve from "@rollup/plugin-node-resolve";
2+
import terser from "@rollup/plugin-terser";
23

3-
import resolve from "rollup-plugin-node-resolve";
4-
import { terser } from "rollup-plugin-terser";
4+
const isProd = process.env.production;
55

66
export default {
77
input: "app.js",
88
output: {
99
file: "dist/app.min.js",
1010
format: "es",
1111
name: "app",
12-
sourcemap: false,
1312
},
14-
plugins: [
15-
resolve({
16-
module: true,
17-
jsnext: true,
18-
browser: true,
19-
}),
20-
terser(),
21-
],
13+
plugins: [resolve(), isProd && terser()],
2214
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<title>Incremental DOM-"keyed"</title>
7+
<link href="/css/currentStyle.css" rel="stylesheet" />
8+
</head>
9+
10+
<body>
11+
<div id='main'></div>
12+
<script src='dist/main.js'></script>
13+
</body>
14+
15+
</html>

frameworks/keyed/incremental-dom/package-lock.json

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"author": "Ahmed Elzeiny",
3+
"license": "Apache-2.0",
4+
"name": "js-framework-benchmark-incremental-dom",
5+
"version": "1.0.0",
6+
"description": "Benchmark for Google's incremental-dom framework",
7+
"js-framework-benchmark": {
8+
"frameworkVersionFromPackage": "incremental-dom",
9+
"frameworkHomeURL": "http://google.github.io/incremental-dom/"
10+
},
11+
"scripts": {
12+
"build-dev": "esbuild src/main.ts --bundle --outfile=dist/main.js --watch",
13+
"build-prod": "esbuild src/main.ts --bundle --minify --outfile=dist/main.js"
14+
},
15+
"keywords": [
16+
"ractive"
17+
],
18+
"homepage": "https://github.com/krausest/js-framework-benchmark",
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/krausest/js-framework-benchmark.git"
22+
},
23+
"dependencies": {
24+
"incremental-dom": "0.7.0"
25+
},
26+
"devDependencies": {
27+
"esbuild": "^0.18.15"
28+
}
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { elementOpen, close, text, Key } from 'incremental-dom';
2+
3+
export function Button(id: string, innerText: string, onClick: () => void, key: Key = null) {
4+
elementOpen(
5+
'button', key, null,
6+
// attributes
7+
'class', 'btn btn-primary btn-block',
8+
'id', id
9+
);
10+
text(innerText)
11+
const el = close();
12+
el.addEventListener('click', onClick);
13+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { elementOpen, elementClose } from 'incremental-dom';
2+
3+
export function Div(className: string, func: () => void) {
4+
elementOpen('div', null, null, 'class', className);
5+
func();
6+
elementClose('div');
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { elementOpen, close, text } from 'incremental-dom';
2+
3+
export function H1(value: string) {
4+
elementOpen('h1');
5+
text(value);
6+
close();
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { elementOpen, elementClose } from "incremental-dom";
2+
3+
export function GlyphIconSpan() {
4+
// <span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
5+
6+
elementOpen(
7+
'span', null, null,
8+
// attributes
9+
'class', 'preloadicon glyphicon glyphicon-remove',
10+
'aria-hidden', 'true'
11+
);
12+
13+
elementClose('span');
14+
}

0 commit comments

Comments
 (0)