Skip to content

Commit

Permalink
Fixed babel compilation in perspective-d3fc-plugin package
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Feb 26, 2019
1 parent d0bfe8e commit 434da35
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
15 changes: 7 additions & 8 deletions packages/perspective-viewer-d3fc/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
module.exports = {
"presets": [
presets: [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
useBuiltIns: "usage"
}
]
],
"sourceType": "unambiguous",
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
sourceType: "unambiguous",
plugins: [
["@babel/plugin-proposal-decorators", {legacy: true}],
"transform-custom-element-classes",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-transform-for-of",
{
"loose": true
loose: true
}
]
]
};
};
9 changes: 6 additions & 3 deletions packages/perspective-viewer-d3fc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
"name": "@jpmorganchase/perspective-viewer-d3fc",
"version": "0.2.10",
"description": "Perspective.js",
"main": "src/js/plugin/plugin.js",
"main": "cjs/js/plugin/plugin.js",
"files": [
"build/**/*",
"src/**/*",
"cjs/**/*",
"babel.config.js"
],
"scripts": {
"bench": "npm-run-all bench:build bench:run",
"bench:build": "echo \"No Benchmarks\"",
"bench:run": "echo \"No Benchmarks\"",
"build": "webpack --color --config src/config/d3fc.plugin.config.js",
"prebuild": "mkdir -p cjs",
"build:babel": "cp -r src/* cjs && babel src/js --source-maps --out-dir cjs/js",
"build:webpack": "webpack --color --config src/config/d3fc.plugin.config.js",
"build": "npm-run-all build:babel build:webpack",
"test:build": "cp test/html/* build",
"watch": "webpack --color --watch --config src/config/d3fc.plugin.config.js",
"test:run": "jest --silent --color 2>&1",
Expand Down
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: "./src/js/plugin/plugin.js",
entry: "./cjs/js/plugin/plugin.js",
output: {
filename: "d3fc.plugin.js",
library: "perspective-view-d3fc",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/src/js/plugin/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import perspectiveStyle from "../../less/perspective-view.less";
import template from "../../html/d3fc-chart.html";
import {areArraysEqualSimple} from "../utils/utils";

import {bindTemplate} from "@jpmorganchase/perspective-viewer/src/js/utils";
import {bindTemplate} from "@jpmorganchase/perspective-viewer/cjs/js/utils";

const styleWithD3FC = `${style}${getD3FCStyles()}`;

Expand Down

0 comments on commit 434da35

Please sign in to comment.