Skip to content

Commit

Permalink
Merge pull request #301 from jpmorganchase/babel7
Browse files Browse the repository at this point in the history
Ported to babel 7
  • Loading branch information
texodus authored Nov 9, 2018
2 parents 2e39cd5 + f8d252d commit 4af8291
Show file tree
Hide file tree
Showing 26 changed files with 151 additions and 158 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ simple to build real-time & user configurable analytics entirely in the browser.
* [Project Site](https://jpmorganchase.github.io/perspective/)
* [Installation](https://jpmorganchase.github.io/perspective/docs/installation.html)
* [User's Guide](https://jpmorganchase.github.io/perspective/docs/usage.html)
* [Perspective API](https://jpmorganchase.github.io/perspective/docs/perspective_api.html)
* [Perspective Viewer API](https://jpmorganchase.github.io/perspective/docs/viewer_api.html)
* [Perspective API](https://jpmorganchase.github.io/perspective/docs/perspective.html)
* [Perspective Viewer API](https://jpmorganchase.github.io/perspective/docs/perspective-viewer.html)
2 changes: 1 addition & 1 deletion examples/simple/superstore-arrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<body>

<perspective-viewer row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>
<perspective-viewer view="sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>

</perspective-viewer>

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"@apache-arrow/es5-esm": "^0.3.1",
"@webpack-contrib/schema-utils": "^1.0.0-beta.0",
"arraybuffer-loader": "^1.0.2",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"@babel/core": "^7.1.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.2",
"babel-loader": "^8.0.4",
"babel-plugin-transform-custom-element-classes": "^0.1.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-for-of": "^6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"@babel/plugin-proposal-decorators": "^7.1.2",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.1.5",
"@babel/plugin-transform-for-of": "^7.0.0",
"@babel/runtime": "^7.1.5",
"chart.js": "^2.7.1",
"clean-css-cli": "4.2.1",
"clean-css-loader": "^1.1.0",
Expand Down
22 changes: 22 additions & 0 deletions packages/perspective-jupyterlab/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
}
]
]
};
22 changes: 22 additions & 0 deletions packages/perspective-viewer-highcharts/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
}
]
]
};
30 changes: 0 additions & 30 deletions packages/perspective-viewer-highcharts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,6 @@
"build/**/*",
"src/**/*"
],
"babel": {
"ignore": [
"test"
],
"presets": [
[
"env",
{
"useBuiltIns": true
}
]
],
"plugins": [
"transform-decorators-legacy",
"transform-custom-element-classes",
[
"transform-runtime",
{
"polyfill": false
}
],
"transform-object-rest-spread",
[
"transform-es2015-for-of",
{
"loose": true
}
]
]
},
"scripts": {
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
Expand Down
22 changes: 22 additions & 0 deletions packages/perspective-viewer-hypergrid/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
}
]
]
};
30 changes: 0 additions & 30 deletions packages/perspective-viewer-hypergrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,6 @@
"build/**/*",
"src/**/*"
],
"babel": {
"ignore": [
"test"
],
"presets": [
[
"env",
{
"useBuiltIns": true
}
]
],
"plugins": [
"transform-decorators-legacy",
"transform-custom-element-classes",
[
"transform-runtime",
{
"polyfill": false
}
],
"transform-object-rest-spread",
[
"transform-es2015-for-of",
{
"loose": true
}
]
]
},
"scripts": {
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

import {COLUMN_SEPARATOR_STRING} from "@jpmorganchase/perspective/src/js/defaults.js";
const {COLUMN_SEPARATOR_STRING} = require("@jpmorganchase/perspective/src/js/defaults.js");

const TREE_COLUMN_INDEX = require("fin-hypergrid/src/behaviors/Behavior").prototype.treeColumnIndex;

Expand Down
22 changes: 22 additions & 0 deletions packages/perspective-viewer/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
}
]
]
};
30 changes: 0 additions & 30 deletions packages/perspective-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,6 @@
"build/**/*",
"src/**/*"
],
"babel": {
"ignore": [
"test"
],
"presets": [
[
"env",
{
"useBuiltIns": true
}
]
],
"plugins": [
"transform-decorators-legacy",
"transform-custom-element-classes",
[
"transform-runtime",
{
"polyfill": false
}
],
"transform-object-rest-spread",
[
"transform-es2015-for-of",
{
"loose": true
}
]
]
},
"scripts": {
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer/src/config/view.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require("path");
const common = require("@jpmorganchase/perspective/src/config/common.config.js");

module.exports = Object.assign({}, common(), {
entry: ["babel-polyfill", "./src/js/view.js", "./src/less/default.less"],
entry: "./src/js/view.js",
output: {
filename: "perspective.view.js",
library: "perspective-view",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer/src/js/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "@webcomponents/shadycss/custom-style-interface.min.js";
import _ from "underscore";
import {polyfill} from "mobile-drag-drop";

import perspective from "@jpmorganchase/perspective/src/js/perspective.parallel.js";
import perspective from "@jpmorganchase/perspective";
import {ViewPrivate} from "./view/ViewPrivate.js";
import "./row.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer/src/js/view/ViewPrivate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "@webcomponents/shadycss/custom-style-interface.min.js";

import _ from "underscore";

import perspective from "@jpmorganchase/perspective/src/js/perspective.parallel.js";
import perspective from "@jpmorganchase/perspective";
import {undrag, column_undrag, column_dragleave, column_dragover, column_drop, drop, drag_enter, allow_drop, disallow_drop} from "../dragdrop.js";
import {column_visibility_clicked, column_aggregate_clicked, column_filter_clicked, sort_order_clicked} from "./actions.js";
import {renderers} from "./renderers.js";
Expand Down
22 changes: 22 additions & 0 deletions packages/perspective/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
}
]
]
};
29 changes: 1 addition & 28 deletions packages/perspective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,11 @@
"publishConfig": {
"access": "public"
},
"babel": {
"presets": [
[
"env",
{
"useBuiltIns": true
}
]
],
"plugins": [
"transform-decorators-legacy",
"transform-custom-element-classes",
[
"transform-runtime",
{
"polyfill": false
}
],
"transform-object-rest-spread",
[
"transform-es2015-for-of",
{
"loose": true
}
]
]
},
"files": [
"build/*",
"index.d.ts",
"src/**/*",
"webpack.plugin.js"
"webpack-plugin.js"
],
"typings": "index.d.ts",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion packages/perspective/src/js/perspective.asmjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*
*/

require("babel-polyfill");

const load_perspective = require("../../obj/psp.asmjs.js").load_perspective;
const perspective = require("./perspective.js");
const perspective = require("./perspective.js").default;

const Module = load_perspective({
wasmJSMethod: "asmjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/perspective/src/js/perspective.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (typeof self !== "undefined" && self.performance === undefined) {

const CHUNKED_THRESHOLD = 100000;

module.exports = function(Module) {
export default function(Module) {
let __MODULE__ = Module;

/******************************************************************************
Expand Down Expand Up @@ -1900,4 +1900,4 @@ module.exports = function(Module) {
}

return perspective;
};
}
Loading

0 comments on commit 4af8291

Please sign in to comment.