Skip to content

Commit

Permalink
Merge pull request #455 from jpmorganchase/clean-bench
Browse files Browse the repository at this point in the history
Fixes for `clean` and `bench` development scripts
  • Loading branch information
texodus authored Feb 27, 2019
2 parents 711071e + 7631f0c commit 9626053
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/perspective-viewer-d3fc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jpmorganchase/perspective-viewer-d3fc",
"version": "0.2.10",
"version": "0.2.16",
"description": "Perspective.js",
"main": "cjs/js/plugin/plugin.js",
"files": [
Expand All @@ -20,7 +20,7 @@
"watch": "webpack --color --watch --config src/config/d3fc.plugin.config.js",
"test:run": "jest --silent --color 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean": "find build -mindepth 1 -delete && find cjs -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ \\( -name *.diff.png -o -name *.failed.png \\) -mindepth 1 -delete"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-highcharts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"watch": "webpack --color --watch --config src/config/highcharts.plugin.config.js",
"test:run": "jest --silent --color 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean": "find build -mindepth 1 -delete && find cjs -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ \\( -name *.diff.png -o -name *.failed.png \\) -mindepth 1 -delete"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-hypergrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test:build": "cp test/html/* build",
"test:run": "jest --silent --color",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean": "find build -mindepth 1 -delete && find cjs -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ \\( -name *.diff.png -o -name *.failed.png \\) -mindepth 1 -delete"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/bench/js/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LIMIT = args.indexOf("--limit");

const multi_template = (xs, ...ys) => ys[0].map((y, i) => [y, xs.reduce((z, x, ix) => (ys[ix] ? z + x + ys[ix][i] : z + x), "")]);

const UNPKG_VERSIONS = ["0.2.15", "0.2.12", "0.2.11", "0.2.10", "0.2.9", "0.2.8", "0.2.7", "0.2.6", "0.2.5", "0.2.4", "0.2.3", "0.2.2", "0.2.1", "0.2.0"];
const UNPKG_VERSIONS = ["0.2.16", "0.2.15", "0.2.12", "0.2.11", "0.2.10", "0.2.9", "0.2.8", "0.2.7", "0.2.6", "0.2.5", "0.2.4", "0.2.3", "0.2.2", "0.2.1", "0.2.0"];
const UNPKG_URLS = multi_template`https://unpkg.com/@jpmorganchase/perspective@${UNPKG_VERSIONS}/build/perspective.js`;

const OLD_FORMAT_UNPKG_VERSIONS = ["0.2.0-beta.3"];
Expand Down
3 changes: 3 additions & 0 deletions packages/perspective/bench/js/browser_runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ async function* run_to_format_cases(table, config, format) {
const name = `view(${JSON.stringify(token)})`;

const view = table.view(config);
if (!view[format]) {
return;
}
await view.schema();

console.log(`Benchmarking \`${name}.${format}()\``);
Expand Down
3 changes: 3 additions & 0 deletions scripts/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ try {
clean(path.join(".", "cpp", "perspective", "obj"));
clean(path.join(".", "cpp", "perspective", "cppbuild"));
}
if (!IS_SCREENSHOTS) {
execute("lerna run clean");
}
clean_screenshots();
} catch (e) {
console.error(e.message);
Expand Down

0 comments on commit 9626053

Please sign in to comment.