Skip to content

Commit 0703697

Browse files
committed
Merge branch 'leeoniya-results-ui'
2 parents a24f236 + 23b7945 commit 0703697

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

results-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"devDependencies": {
1818
"clean-css": "^4.2.1",
1919
"domvm": "git://github.com/domvm/domvm.git#3.4.5",
20-
"rollup": "^0.64.1",
20+
"rollup": "^0.65.0",
2121
"rollup-plugin-buble": "^0.19.2",
22-
"uglify-js": "^3.4.7",
23-
"yargs": "^12.0.1"
22+
"uglify-js": "^3.4.8",
23+
"yargs-parser": "^10.1.0"
2424
},
2525
"dependencies": {}
2626
}

results-ui/src/build.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ const buble = require('rollup-plugin-buble');
44
const UglifyJS = require('uglify-js');
55
const CleanCSS = require('clean-css');
66
const path = require("path");
7-
const yargs = require("yargs");
7+
const yargs = require("yargs-parser");
88

99
const start = +new Date();
1010

1111
const RESULTS_PATH = path.resolve(__dirname + '/../../webdriver-ts/results');
1212

13-
let args = yargs(process.argv)
14-
.usage("$0 [--framework Framework1 Framework2 ...]")
15-
.array("framework").argv;
13+
const frameworks = yargs(process.argv, {array: ["framework"]}).framework || [];
14+
15+
function filterFramework(file) {
16+
return (
17+
frameworks.length === 0 ||
18+
frameworks.some(f => file.indexOf(f) > -1)
19+
);
20+
}
1621

1722
function encodeBench(obj) {
1823
return [
@@ -33,7 +38,7 @@ let libs = {
3338
};
3439

3540
// grab result files, group by framework, bench types and encode benches into arrays
36-
fs.readdirSync(RESULTS_PATH).filter(file => file.endsWith('.json')).filter(file => !args.framework || args.framework.length===0 || args.framework.some(f => file.indexOf(f)>-1)).forEach(file => {
41+
fs.readdirSync(RESULTS_PATH).filter(file => file.endsWith('.json') && filterFramework(file)).forEach(file => {
3742
var r = JSON.parse(fs.readFileSync(RESULTS_PATH + "/" + file, 'utf8'));
3843
var implGroup = r.keyed ? libs.keyed : libs.unkeyed;
3944
var libName = r.framework;

0 commit comments

Comments
 (0)