From a98f864faab57305b041fadb9144d47c8af67e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vy=C4=8D=C3=ADtal?= Date: Mon, 6 Apr 2020 14:09:57 +0200 Subject: [PATCH] feat(build): use common build process (#111) https://github.com/visjs/vis-util/pull/144 --- .babelrc | 4 - .circleci/config.yml | 4 + .gitignore | 4 + babel.config.js | 4 + declarations/entry-esnext.d.ts | 7 + declarations/entry-peer.d.ts | 1 + declarations/entry-standalone.d.ts | 2 + examples/graph3d/01_basics.html | 2 +- examples/graph3d/02_camera.html | 2 +- examples/graph3d/03_filter_data.html | 2 +- examples/graph3d/04_animation.html | 2 +- examples/graph3d/05_line.html | 2 +- examples/graph3d/06_moving_dots.html | 2 +- examples/graph3d/07_dot_cloud_colors.html | 2 +- examples/graph3d/08_dot_cloud_size.html | 2 +- examples/graph3d/09_mobile.html | 2 +- examples/graph3d/10_styling.html | 2 +- examples/graph3d/11_tooltips.html | 2 +- examples/graph3d/12_custom_labels.html | 5 +- examples/graph3d/13_disable_zoom.html | 2 +- examples/graph3d/14_zoom_ctrl_scroll.html | 2 +- examples/graph3d/15_styling_per_point.html | 2 +- examples/graph3d/16_styling_surface.html | 2 +- examples/graph3d/playground/index.html | 2 +- .../rotateAxisLabels/rotateAxisLabels.html | 2 +- index.js | 4 +- lib/entry-esnext.js | 17 + lib/entry-peer.js | 1 + lib/entry-standalone.js | 2 + lib/graph3d/Camera.js | 4 +- lib/graph3d/DataGroup.js | 15 +- lib/graph3d/Filter.js | 4 +- lib/graph3d/Graph3d.js | 24 +- lib/graph3d/Settings.js | 11 +- lib/graph3d/Slider.js | 4 +- lib/module/hammer.js | 14 +- lib/module/moment.js | 7 +- lib/shared/Validator.js | 2 +- package-lock.json | 9077 +++++++++++------ package.json | 62 +- rollup.build.js | 19 + test/Graph3d.test.js | 2 +- 42 files changed, 5911 insertions(+), 3423 deletions(-) delete mode 100644 .babelrc create mode 100644 babel.config.js create mode 100644 declarations/entry-esnext.d.ts create mode 100644 declarations/entry-peer.d.ts create mode 100644 declarations/entry-standalone.d.ts create mode 100644 lib/entry-esnext.js create mode 100644 lib/entry-peer.js create mode 100644 lib/entry-standalone.js create mode 100644 rollup.build.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 5c249784f..000000000 --- a/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "exclude": ["**/node_modules/**"], - "presets": ["vis-dev-utils/babel-preset"] -} diff --git a/.circleci/config.yml b/.circleci/config.yml index 567ab5c18..3a2cc50b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,6 +50,10 @@ jobs: root: .. paths: - "repo/dist" + - "repo/esnext" + - "repo/peer" + - "repo/standalone" + - "repo/styles" lint: executor: node diff --git a/.gitignore b/.gitignore index 0176d9653..62c704f61 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,11 @@ gen/ # generated files /coverage/ /dist/ +/esnext/ /examples/examples.css /examples/generated/ /examples/index.html /examples/thumbnails/ +/peer/ +/standalone/ +/vis-graph3d-0.0.0-no-version.tgz diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 000000000..fd51ab079 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,4 @@ +module.exports = { + exclude: require("vis-dev-utils").BABEL_IGNORE_RE, + presets: [["vis-dev-utils/babel-preset", { ts: true }]] +}; diff --git a/declarations/entry-esnext.d.ts b/declarations/entry-esnext.d.ts new file mode 100644 index 000000000..5e92b7770 --- /dev/null +++ b/declarations/entry-esnext.d.ts @@ -0,0 +1,7 @@ +export const Graph3d: any; +export const Graph3dCamera: any; +export const Graph3dFilter: any; +export const Graph3dPoint2d: any; +export const Graph3dPoint3d: any; +export const Graph3dSlider: any; +export const Graph3dStepNumber: any; diff --git a/declarations/entry-peer.d.ts b/declarations/entry-peer.d.ts new file mode 100644 index 000000000..f8111af9e --- /dev/null +++ b/declarations/entry-peer.d.ts @@ -0,0 +1 @@ +export * from "./entry-esnext"; diff --git a/declarations/entry-standalone.d.ts b/declarations/entry-standalone.d.ts new file mode 100644 index 000000000..dff8503b3 --- /dev/null +++ b/declarations/entry-standalone.d.ts @@ -0,0 +1,2 @@ +export * from "./entry-esnext"; +export * from "vis-data/esnext"; diff --git a/examples/graph3d/01_basics.html b/examples/graph3d/01_basics.html index 10aff9cfe..54024c5d6 100644 --- a/examples/graph3d/01_basics.html +++ b/examples/graph3d/01_basics.html @@ -7,7 +7,7 @@ body {font: 10pt arial;} - + + + + + + + + + + + + + + + + + + diff --git a/examples/graph3d/rotateAxisLabels/rotateAxisLabels.html b/examples/graph3d/rotateAxisLabels/rotateAxisLabels.html index 76a68b103..489de939d 100644 --- a/examples/graph3d/rotateAxisLabels/rotateAxisLabels.html +++ b/examples/graph3d/rotateAxisLabels/rotateAxisLabels.html @@ -33,7 +33,7 @@ text-align: center; } - +