Skip to content

Commit

Permalink
Standardized build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Aug 12, 2018
1 parent 79a9ed7 commit a2a664e
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ install:

script:
- PSP_DOCKER=1 npm run build
- PSP_DOCKER=1 npm run build_test
- PSP_DOCKER=1 npm run test:build
- npm run quiet_test
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
},
"scripts": {
"build": "[[ -z \"${PSP_DOCKER}\" ]] && npm run _build || npm run _emsdk -- npm run _build",
"build_bench": "lerna run build_bench --stream",
"bench": "lerna run bench --stream",
"build_test": "[[ -z \"${PSP_DOCKER}\" ]] && npm run _build_test || npm run _emsdk -- npm run _build_test",
"test": "npm run _test_perspective && npm run _test_viewer && npm run _test_hypergrid && npm run _test_highcharts",
"bench:build": "lerna run bench:build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"bench:run": "lerna exec ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} -- npm run bench:run",
"bench": "npm-run-all bench:build bench:run",
"test:build": "[[ -z \"${PSP_DOCKER}\" ]] && npm run _build_test || npm run _emsdk -- npm run _build_test",
"test:run": "npm run _test_perspective && npm run _test_viewer && npm run _test_hypergrid && npm run _test_highcharts",
"test": "npm-run-all test:build test:run",
"quiet_test": "npm run _puppeteer -- npm run _quiet_test",
"write_tests": "WRITE_TESTS=1 npm run test",
"write_tests": "WRITE_TESTS=1 npm run test:run",
"postinstall": "lerna bootstrap --hoist",
"_build": "lerna run build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"_build_test": "lerna run build_test ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"_build_test": "lerna run test:build ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"_emsdk": "docker run --rm -it -v $(pwd):/src -e PACKAGE=${PACKAGE} perspective/emsdk",
"_puppeteer": "docker run -it --rm --shm-size=2g -u root -e WRITE_TESTS=${WRITE_TESTS} -v $(pwd):/src -w /src/packages/${PACKAGE} perspective/puppeteer",
"_test": "./node_modules/.bin/jest --runInBand",
"_quiet_test": "lerna run test ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}}",
"_test_perspective": "PACKAGE=perspective npm run _puppeteer -- npm run test",
"_test_viewer": "PACKAGE=perspective-viewer npm run _puppeteer -- npm run test",
"_test_hypergrid": "PACKAGE=perspective-viewer-hypergrid npm run _puppeteer -- npm run test",
"_test_highcharts": "PACKAGE=perspective-viewer-highcharts npm run _puppeteer -- npm run test"
"_quiet_test": "lerna run test:run ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}}",
"_test_perspective": "PACKAGE=perspective npm run _puppeteer -- npm run test:run",
"_test_viewer": "PACKAGE=perspective-viewer npm run _puppeteer -- npm run test:run",
"_test_hypergrid": "PACKAGE=perspective-viewer-hypergrid npm run _puppeteer -- npm run test:run",
"_test_highcharts": "PACKAGE=perspective-viewer-highcharts npm run _puppeteer -- npm run test:run"
}
}
21 changes: 13 additions & 8 deletions packages/perspective-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
"access": "public"
},
"scripts": {
"build": "npm run copy && npm-run-all -l -p build:*",
"build:view": "webpack --config ../perspective-viewer/test/config/view.config.js --context ../perspective-viewer/ --output-path ../perspective-examples/build",
"build:hypergrid": "webpack --config ../perspective-viewer-hypergrid/test/config/hypergrid.config.js --context ../perspective-viewer-hypergrid/ --output-path ../perspective-examples/build",
"build:highcharts": "webpack --config ../perspective-viewer-highcharts/test/config/highcharts.config.js --context ../perspective-viewer-highcharts/ --output-path ../perspective-examples/build",
"build_test": "npm run copy",
"watch:view": "webpack --watch --config ../perspective-viewer/test/config/view.config.js --context ../perspective-viewer/ --output-path ../perspective-examples/build",
"watch:highcharts": "webpack --watch --config ../perspective-viewer-highcharts/test/config/highcharts.config.js --context ../perspective-viewer-highcharts/ --output-path ../perspective-examples/build",
"copy": "mkdir -p build && npm-run-all -l -p copy:*",
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"build": "npm run copy && npm-run-all -p build:*",
"build:view": "webpack --color --config ../perspective-viewer/test/config/view.config.js --context ../perspective-viewer/ --output-path ../perspective-examples/build",
"build:hypergrid": "webpack --color --config ../perspective-viewer-hypergrid/test/config/hypergrid.config.js --context ../perspective-viewer-hypergrid/ --output-path ../perspective-examples/build",
"build:highcharts": "webpack --color --config ../perspective-viewer-highcharts/test/config/highcharts.config.js --context ../perspective-viewer-highcharts/ --output-path ../perspective-examples/build",
"test:build": "npm run copy",
"test:run": "echo \"No Tests\"",
"test": "npm-run-all test:build test:run",
"watch:view": "webpack --color --watch --config ../perspective-viewer/test/config/view.config.js --context ../perspective-viewer/ --output-path ../perspective-examples/build",
"watch:highcharts": "webpack --color --watch --config ../perspective-viewer-highcharts/test/config/highcharts.config.js --context ../perspective-viewer-highcharts/ --output-path ../perspective-examples/build",
"copy": "mkdir -p build && npm-run-all -p copy:*",
"copy:build": "cp -r node_modules/@jpmorganchase/perspective/build/* build",
"copy:css": "cp -r node_modules/@jpmorganchase/perspective-viewer/build/*.css build",
"copy:src-html": "cp src/html/* build",
Expand Down
8 changes: 7 additions & 1 deletion packages/perspective-jupyterlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
"access": "public"
},
"scripts": {
"build": "webpack --config src/config/plugin.config.js",
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"test": "npm-run-all test:build test:run",
"test:build": "echo \"No Tests\"",
"test:run": "echo \"No Tests\"",
"build": "webpack --color --config src/config/plugin.config.js",
"clean": "rimraf build"
},
"dependencies": {
Expand Down
12 changes: 8 additions & 4 deletions packages/perspective-viewer-highcharts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
"build/*"
],
"scripts": {
"highcharts": "webpack --config src/config/highcharts.plugin.config.js",
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"highcharts": "webpack --color --config src/config/highcharts.plugin.config.js",
"build": "npm run highcharts",
"build_test": "cp test/html/* build && webpack --config test/config/highcharts.config.js",
"watch_test": "cp test/html* build && webpack --config --watch test/config/highcharts.config.js",
"test": "jest --silent 2>&1",
"test:build": "cp test/html/* build && webpack --color --config test/config/highcharts.config.js",
"watch_test": "cp test/html* build && webpack --color --config --watch test/config/highcharts.config.js",
"test:run": "jest --silent 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ -name *.diff.png -o -name *.failed.png -mindepth 1 -delete"
},
Expand Down
10 changes: 7 additions & 3 deletions packages/perspective-viewer-hypergrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
"build/*"
],
"scripts": {
"hypergrid": "webpack --config src/config/hypergrid.plugin.config.js",
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"hypergrid": "webpack --color --config src/config/hypergrid.plugin.config.js",
"build": "npm run hypergrid",
"build_test": "cp test/html/* build && webpack --config test/config/hypergrid.config.js",
"test": "jest --silent 2>&1",
"test:build": "cp test/html/* build && webpack --color --config test/config/hypergrid.config.js",
"test:run": "jest --silent 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ -name *.diff.png -o -name *.failed.png -mindepth 1 -delete"
},
Expand Down
10 changes: 7 additions & 3 deletions packages/perspective-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
"build/*"
],
"scripts": {
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"themes": "lessc src/less/material.less build/material.css && lessc src/less/material.dark.less build/material.dark.css",
"view": "webpack --config src/config/view.config.js",
"view": "webpack --color --config src/config/view.config.js",
"build": "npm run view && npm run themes",
"build_test": "cp test/html/* build && cp test/csv/* build && cp test/css/* build && webpack --config test/config/view.config.js",
"test": "jest --silent 2>&1",
"test:build": "cp test/html/* build && cp test/csv/* build && cp test/css/* build && webpack --color --config test/config/view.config.js",
"test:run": "jest --silent 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete",
"clean:screenshots": "find screenshots/ -name *.diff.png -o -name *.failed.png -mindepth 1 -delete",
"docs": "documentation build src/js/view.js -f md --shallow > README.md"
Expand Down
40 changes: 21 additions & 19 deletions packages/perspective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,30 @@
],
"typings": "index.d.ts",
"scripts": {
"build_bench": "npm-run-all -l build_bench:*",
"build_bench:benchmark": "webpack --config bench/config/benchmark.config.js",
"build_bench:report": "webpack --config bench/config/report.config.js",
"build_bench:copy": "cp bench/csv/* build",
"bench": "node build/benchmark.js",
"build": "npm-run-all -l build:compile:* build:webpack:* ",
"bench:build": "npm-run-all bench:build:*",
"bench:build:benchmark": "webpack --color --config bench/config/benchmark.config.js",
"bench:build:report": "webpack --color --config bench/config/report.config.js",
"bench:build:copy": "cp bench/csv/* build",
"bench:run": "node build/benchmark.js",
"bench": "npm-run-all bench:build bench:run",
"build": "npm-run-all build:compile:* build:webpack:* ",
"build:compile:copy": "mkdir -p obj build build/wasm_async build/wasm_sync build/asmjs",
"build:compile:emmake": "cd obj/ && emcmake cmake ../ && emmake make -j8",
"build:webpack:asmj": "webpack --config src/config/perspective.asmjs.config.js",
"build:webpack:wasm": "webpack --config src/config/perspective.wasm.config.js",
"build:webpack:parallel": "webpack --config src/config/perspective.parallel.config.js",
"build:webpack:node": "webpack --config src/config/perspective.node.config.js",
"build:webpack:remote": "webpack --config src/config/perspective.remote.config.js",
"build_test": "npm-run-all -l build_test:copy build_test:webpack",
"build_test:copy": "npm-run-all -l -p build_test:copy:*",
"build_test:copy:html": "cp test/html/* build",
"build_test:copy:test": "cp test/csv/* build",
"build_test:webpack": "npm-run-all -l build_test:webpack:*",
"build_test:webpack:browser": "webpack --config test/config/test_browser.config.js",
"build_test:webpack:node": "webpack --config test/config/test_node.config.js",
"build:webpack:asmj": "webpack --color --config src/config/perspective.asmjs.config.js",
"build:webpack:wasm": "webpack --color --config src/config/perspective.wasm.config.js",
"build:webpack:parallel": "webpack --color --config src/config/perspective.parallel.config.js",
"build:webpack:node": "webpack --color --config src/config/perspective.node.config.js",
"build:webpack:remote": "webpack --color --config src/config/perspective.remote.config.js",
"test:build": "npm-run-all test:build:copy test:build:webpack",
"test:build:copy": "npm-run-all -p test:build:copy:*",
"test:build:copy:html": "cp test/html/* build",
"test:build:copy:test": "cp test/csv/* build",
"test:build:webpack": "npm-run-all test:build:webpack:*",
"test:build:webpack:browser": "webpack --color --config test/config/test_browser.config.js",
"test:build:webpack:node": "webpack --color --config test/config/test_node.config.js",
"docs": "documentation build src/js/perspective.js -f md --shallow > README.md",
"test": "jest --runInBand 2>&1",
"test:run": "jest --runInBand 2>&1",
"test": "npm-run-all test:build test:run",
"clean": "find build -mindepth 1 -delete && find obj -mindepth 1 -delete"
},
"jest": {
Expand Down
6 changes: 5 additions & 1 deletion packages/perspective/src/js/perspective.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ class WebSocketHost extends module.exports.Host {
ws.on('message', msg => {
msg = JSON.parse(msg);
this.REQS[msg.id] = ws;
this.process(msg);
try {
this.process(msg);
} catch (e) {
console.error(e);
}
});
ws.on('error', console.error);
});
Expand Down

0 comments on commit a2a664e

Please sign in to comment.