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

Update Webpack example to webpack 4 #393

Merged
merged 3 commits into from
Jan 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
10 changes: 7 additions & 3 deletions examples/webpack/in.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
*/

const perspective = require("@jpmorganchase/perspective").default;
require("@jpmorganchase/perspective-viewer");

const table = perspective.worker().table([{x: 1}]);
table.view().to_json(console.log);
(async () => {
const worker = perspective.worker();
const table = worker.table([{x: 1, y: 2}, {x: 2, y: 2}]);
const view = await table.view();
const json = await view.to_json();
console.log(json);
})();
11 changes: 9 additions & 2 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
"version": "0.2.12",
"description": "An example of using the Perspective Webpack plugin to build a JS file with Webpack.",
"scripts": {
"start": "node server.js",
"start": "webpack-dev-server --content-base ./ --hot",
"webpack": "webpack --config webpack.config.js --color"
},
"keywords": [],
"license": "Apache-2.0",
"dependencies": {
"@jpmorganchase/perspective": "^0.2.12",
"@jpmorganchase/perspective-viewer": "^0.2.12"
"@jpmorganchase/perspective-viewer": "^0.2.12",
"@jpmorganchase/perspective-viewer-highcharts": "^0.2.12",
"@jpmorganchase/perspective-viewer-hypergrid": "^0.2.12"
},
"devDependencies": {
"webpack": "^4.28.4",
"webpack-cli": "3.2.1",
"webpack-dev-server": "^3.1.14"
}
}
2 changes: 2 additions & 0 deletions examples/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const PerspectivePlugin = require("@jpmorganchase/perspective/webpack-plugin");
const path = require("path");

module.exports = {
context: __dirname,
mode: "development",
entry: "./in.js",
output: {
filename: "out.js",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
],
"devDependencies": {
"@apache-arrow/es5-esm": "^0.3.1",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.2.3",
"babel-jest": "^23.6.0",
"chart.js": "^2.7.1",
Expand Down
Loading