Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dominator #585

Merged
merged 2 commits into from
Jun 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions frameworks/keyed/dominator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
/target
/pkg
/wasm-pack.log
/yarn-error.log
29 changes: 29 additions & 0 deletions frameworks/keyed/dominator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "js-framework-benchmark-dominator"
version = "1.0.0"
edition = "2018"

[profile.release]
lto = true
panic = "abort"

[lib]
crate-type = ["cdylib"]

[dependencies]
dominator = "0.5.0"
futures-signals = "0.3.6"
wasm-bindgen = "0.2.46"
js-sys = "0.3.23"

[dependencies.web-sys]
version = "0.3.23"
features = [
"Window",
"Document",
"Element",
]

[dependencies.wasm-bindgen-futures]
version = "0.3.24"
features = ["futures_0_3"]
16 changes: 16 additions & 0 deletions frameworks/keyed/dominator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Because of the heavy amount of Rust dependencies, this example is pre-compiled, so you don't need to compile anything.

However, if you do want to compile it, you will need the following:

* [Rust](https://www.rust-lang.org/tools/install)

* [wasm-pack](https://rustwasm.github.io/wasm-pack/)

After installing those, run these commands:

```
rustup toolchain install nightly
rustup override set nightly
npm install
npm run build-prod-force
```
1 change: 1 addition & 0 deletions frameworks/keyed/dominator/bundled-dist/1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
1 change: 1 addition & 0 deletions frameworks/keyed/dominator/bundled-dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions frameworks/keyed/dominator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dominator</title>
<link href="/css/currentStyle.css" rel="stylesheet"/>
</head>
<body>
<div id='main'></div>
<script src='bundled-dist/index.js'></script>
</body>
</html>
1 change: 1 addition & 0 deletions frameworks/keyed/dominator/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import("../pkg/index.js").catch(console.error);
23 changes: 23 additions & 0 deletions frameworks/keyed/dominator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "js-framework-benchmark-dominator",
"version": "1.0.0",
"description": "Benchmark for dominator",
"license": "ISC",
"js-framework-benchmark": {
"frameworkVersion": "0.5.0"
},
"scripts": {
"build-prod": "echo This is a no-op. && echo Due to heavy dependencies, the generated javascript is already provided. && echo If you really want to rebuild from source use: && echo npm run build-prod-force",
"build-prod-force": "rimraf bundled-dist pkg && webpack"
},
"repository": {
"type": "git",
"url": "https://github.com/krausest/js-framework-benchmark.git"
},
"devDependencies": {
"@wasm-tool/wasm-pack-plugin": "^0.4.2",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.3",
"rimraf": "^2.6.3"
}
}
Loading