Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

Commit 8244a37

Browse files
committed
Adding build_* config to enable benchmarks via browser
1 parent 6abea8b commit 8244a37

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

benchmark/props.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Loading...
1111
</div>
1212

13-
<script type="application/dart" src="props.dart"></script>
14-
<script src="packages/browser/dart.js"></script>
13+
<script defer src="props_browser.dart.js"></script>
1514
</body>
1615
</html>
File renamed without changes.

benchmark/readjson.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Loading...
1111
</div>
1212

13-
<script type="application/dart" src="readjson.dart"></script>
14-
<script src="packages/browser/dart.js"></script>
13+
<script defer src="readjson_browser.dart.js"></script>
1514
</body>
1615
</html>
File renamed without changes.

build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configuration for Dart build system - https://github.com/dart-lang/build
2+
# Enables running benchmarks via browser: `pub run build_runner serve`
3+
targets:
4+
$default:
5+
builders:
6+
build_web_compilers|entrypoint:
7+
generate_for:
8+
- benchmark/*_browser.dart

pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ dependencies:
1414
dart_style: ^1.0.6
1515

1616
dev_dependencies:
17+
build_runner: ^0.10.0
18+
build_web_compilers: ^0.4.0
1719
test: ^1.3.0
1820
yaml: ^2.1.15
1921

0 commit comments

Comments
 (0)