Skip to content

Commit 5436833

Browse files
committed
Merge branch 'kivi' of https://github.com/localvoid/js-framework-benchmark into localvoid-kivi
2 parents 7c0b436 + f73e406 commit 5436833

File tree

9 files changed

+509
-0
lines changed

9 files changed

+509
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ <h3 class="panel-title">Choose a framework:</h3>
2525
<li><a href="domvm-v1.2.9/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> domvm v1.2.9</a></li>
2626
<li><a href="ember-v2.6.1/dist/"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> Ember v2.6.1</a></li>
2727
<li><a href="inferno-v0.7.13/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> Inferno v0.7.13</a></li>
28+
<li><a href="kivi-v0.11.0/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> kivi v0.11.0</a></li>
2829
<li><a href="mithril-v0.2.5/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> Mithril v0.2.5</a></li>
2930
<li><a href="mithril-v1.0.0-alpha/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> Mithril v1.0.0-alpha</a></li>
3031
<li><a href="plastiq-v1.30.1/index.html"><span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span> plastiq v1.30.1</a></li>

kivi-v0.11.0/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
build
2+
dist
3+
4+
node_modules
5+
6+
.DS_Store
7+
.idea
8+
.vscode
9+
.npm-debug
10+
npm-debug.log

kivi-v0.11.0/gulpfile.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
const gulp = require('gulp');
2+
const typescript = require('typescript');
3+
const ts = require('gulp-typescript');
4+
const tslint = require("gulp-tslint");
5+
const rollup = require('rollup');
6+
const rollupReplace = require('rollup-plugin-replace');
7+
const rollupNodeResolve = require('rollup-plugin-node-resolve');
8+
const closureCompiler = require('google-closure-compiler').gulp();
9+
10+
const ClosureConfig = {
11+
compilation_level: 'ADVANCED',
12+
entry_point: 'goog:main',
13+
dependency_mode: 'STRICT',
14+
language_in: 'ECMASCRIPT6_STRICT',
15+
language_out: 'ECMASCRIPT5_STRICT',
16+
use_types_for_optimization: true,
17+
assume_function_wrapper: true,
18+
output_wrapper: '(function(){%output%}).call();',
19+
summary_detail_level: 3,
20+
warning_level: 'QUIET',
21+
};
22+
23+
function clean() {
24+
const del = require('del');
25+
return del(['build', 'dist']);
26+
}
27+
28+
function compileTS() {
29+
return gulp.src('main.ts')
30+
.pipe(tslint({
31+
formatter: "verbose",
32+
}))
33+
.pipe(ts(Object.assign(require('./tsconfig.json').compilerOptions, {
34+
typescript: require('typescript'),
35+
})))
36+
.pipe(gulp.dest('build/es6'));
37+
}
38+
39+
function bundle(done) {
40+
return rollup.rollup({
41+
format: 'es6',
42+
entry: 'build/es6/main.js',
43+
plugins: [
44+
rollupReplace({
45+
delimiters: ['<@', '@>'],
46+
values: {
47+
KIVI_DEBUG: 'DEBUG_DISABLED',
48+
},
49+
}),
50+
rollupNodeResolve({jsnext: true}),
51+
]
52+
}).then(function(bundle) {
53+
return bundle.write({
54+
format: 'es',
55+
dest: 'build/main.es6.js',
56+
intro: 'goog.module("main");',
57+
sourceMap: 'inline',
58+
});
59+
});
60+
}
61+
62+
function compile() {
63+
return gulp.src(['build/main.es6.js'])
64+
.pipe(closureCompiler(Object.assign({}, ClosureConfig, {
65+
js_output_file: 'main.js',
66+
})))
67+
.pipe(gulp.dest('dist'));
68+
}
69+
70+
const build = gulp.series(
71+
clean,
72+
compileTS,
73+
bundle,
74+
compile);
75+
76+
exports.build = build;

kivi-v0.11.0/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>kivi v0.11.0</title>
6+
<link href="../css/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
7+
<link href="../css/main.css" rel="stylesheet"/>
8+
</head>
9+
<body>
10+
<div id="main"></div>
11+
<script src="dist/main.js"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)