From 1ecba37236722e884a95a1c094d1febd86746fcb Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 18:52:05 +0400 Subject: [PATCH 1/4] external core, d3 and lodash --- build/webpack.dev.conf.js | 2 +- build/webpack.prod.conf.js | 3 + examples/demo.html | 2 +- package.json | 10 +- src/index.ts | 14 +-- yarn.lock | 243 ++----------------------------------- 6 files changed, 25 insertions(+), 249 deletions(-) diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 9a05316..9149b8a 100755 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -2,7 +2,7 @@ const baseWebpackConfig = require('./webpack.base.conf'); var conf = baseWebpackConfig; conf.devtool = 'inline-source-map'; -conf.watch = true; conf.mode = 'development'; +conf.output.filename = 'index.dev.js'; module.exports = conf; diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 94cb91d..676c9a9 100755 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -2,5 +2,8 @@ const baseWebpackConfig = require('./webpack.base.conf'); var conf = baseWebpackConfig; conf.mode = 'production'; +conf.externals = [ + '@chartwerk/core', 'd3', 'lodash' +]; module.exports = baseWebpackConfig; diff --git a/examples/demo.html b/examples/demo.html index 4d43f1a..98b8f0f 100644 --- a/examples/demo.html +++ b/examples/demo.html @@ -4,7 +4,7 @@ - +
diff --git a/package.json b/package.json index f2e13ec..46faa98 100644 --- a/package.json +++ b/package.json @@ -4,23 +4,19 @@ "description": "Chartwerk scatter pod", "main": "dist/index.js", "scripts": { - "build": "webpack --config build/webpack.prod.conf.js", - "dev": "webpack --config build/webpack.dev.conf.js", + "build": "webpack --config build/webpack.prod.conf.js && webpack --config build/webpack.dev.conf.js", + "dev": "webpack --watch --config build/webpack.dev.conf.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": {}, "author": "CorpGlory", "license": "Apache-2.0", "dependencies": { - "@chartwerk/core": "^0.4.0" + "@chartwerk/core": "^0.5.0-beta3" }, "devDependencies": { - "@types/d3": "^5.7.2", - "@types/lodash": "^4.14.149", "css-loader": "^3.4.2", - "d3": "^5.15.0", "d3-delaunay": "^6.0.2", - "lodash": "^4.17.15", "style-loader": "^1.1.3", "ts-loader": "^6.2.1", "typescript": "^3.8.3", diff --git a/src/index.ts b/src/index.ts index f0928ac..8fde794 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -import { ChartwerkPod, VueChartwerkPodMixin, TickOrientation, TimeFormat, yAxisOrientation, CrosshairOrientation, PanOrientation } from '@chartwerk/core'; -import { ScatterData, ScatterOptions, PointType, LineType, ColorFormatter } from './types'; +import { ChartwerkPod, VueChartwerkPodMixin, TickOrientation, TimeFormat, yAxisOrientation, CrosshairOrientation } from '@chartwerk/core'; +import { ScatterData, ScatterOptions, PointType, LineType } from './types'; import { DelaunayDiagram } from './delaunay'; @@ -19,7 +19,7 @@ export class ChartwerkScatterPod extends ChartwerkPod this.xScale(d[0])) .y((d: [number, number]) => this.getYScale(orientation)(d[1])); @@ -283,7 +283,7 @@ export class ChartwerkScatterPod extends ChartwerkPod Date: Tue, 17 May 2022 18:52:18 +0400 Subject: [PATCH 2/4] 0.5.0-beta3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46faa98..fd1d50e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/scatter-pod", - "version": "0.4.1", + "version": "0.5.0-beta3", "description": "Chartwerk scatter pod", "main": "dist/index.js", "scripts": { From 85045734517e778279be8ca9ca1057b0b10a8397 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:37:31 +0400 Subject: [PATCH 3/4] upd core --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index fd1d50e..38fb918 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "author": "CorpGlory", "license": "Apache-2.0", "dependencies": { - "@chartwerk/core": "^0.5.0-beta3" + "@chartwerk/core": "^0.5.0" }, "devDependencies": { "css-loader": "^3.4.2", diff --git a/yarn.lock b/yarn.lock index b95e8b5..85860c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,13 @@ # yarn lockfile v1 -"@chartwerk/core@^0.5.0-beta3": - version "0.5.0-beta3" - resolved "https://registry.yarnpkg.com/@chartwerk/core/-/core-0.5.0-beta3.tgz#861f5c022eb180fba70fc8eacd5ab977e5ea55e9" - integrity sha512-Z8XvVoDgMre+E880SHQKy+1PsKT0Vq4Jp2JumJVsFvUx2rYBAxcR9OUmA36t2i/1+nblXF7lisnix0xq5K8VyA== +"@chartwerk/core@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@chartwerk/core/-/core-0.5.0.tgz#7d641a5ee3ec9ca588f5b06a0504659113745636" + integrity sha512-YFqBJ8WFb83yZO2VR+XVRSMX3+ErGcGcdHy5aLeLzOqBW09gO7NENdzlCWXQLsGSx+f9RK2GcSTM4z0Q7OEDfA== dependencies: d3 "^5.7.2" - lodash "^4.17.21" + lodash "^4.14.149" "@types/json-schema@^7.0.5": version "7.0.7" @@ -1813,7 +1813,7 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash@^4.17.21: +lodash@^4.14.149: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== From c4cea54518ea7bbe078d7f2d21409c08ea0424cd Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:37:36 +0400 Subject: [PATCH 4/4] 0.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38fb918..2b07606 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/scatter-pod", - "version": "0.5.0-beta3", + "version": "0.5.0", "description": "Chartwerk scatter pod", "main": "dist/index.js", "scripts": {