From 8f53a3c23a1e0c3d57271c631cc6ea87e37d733f Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 17:52:42 +0400 Subject: [PATCH 01/10] do not bundle core, d3 and lodash && dev bundle --- build/dev.webpack.conf.js | 2 +- build/prod.webpack.conf.js | 3 +++ examples/01-basic.html | 2 +- examples/02-reversed.html | 2 +- package.json | 10 +++------- src/index.ts | 3 +-- yarn.lock | 21 ++++++++++++--------- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/build/dev.webpack.conf.js b/build/dev.webpack.conf.js index d8afe83..31274e1 100644 --- a/build/dev.webpack.conf.js +++ b/build/dev.webpack.conf.js @@ -2,7 +2,7 @@ const baseWebpackConfig = require('./base.webpack.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/prod.webpack.conf.js b/build/prod.webpack.conf.js index c079cff..e30710d 100644 --- a/build/prod.webpack.conf.js +++ b/build/prod.webpack.conf.js @@ -2,5 +2,8 @@ const baseWebpackConfig = require('./base.webpack.conf'); var conf = baseWebpackConfig; conf.mode = 'production'; +conf.externals = [ + '@chartwerk/core' +]; module.exports = baseWebpackConfig; diff --git a/examples/01-basic.html b/examples/01-basic.html index 9b0e831..f9ff367 100644 --- a/examples/01-basic.html +++ b/examples/01-basic.html @@ -4,7 +4,7 @@ - +
diff --git a/examples/02-reversed.html b/examples/02-reversed.html index d45c114..8707a45 100644 --- a/examples/02-reversed.html +++ b/examples/02-reversed.html @@ -4,7 +4,7 @@ - +
diff --git a/package.json b/package.json index 5533825..7275a33 100644 --- a/package.json +++ b/package.json @@ -4,21 +4,17 @@ "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { - "build": "webpack --config build/prod.webpack.conf.js", - "dev": "webpack --config build/dev.webpack.conf.js", + "build": "webpack --config build/prod.webpack.conf.js && webpack --config build/dev.webpack.conf.js", + "dev": "webpack --watch --config build/dev.webpack.conf.js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "CorpGlory", "license": "Apache-2.0", "dependencies": { - "@chartwerk/core": "^0.4.1" + "@chartwerk/core": "^0.5.0-beta" }, "devDependencies": { - "@types/d3": "^5.7.2", - "@types/lodash": "^4.14.149", "css-loader": "^3.4.2", - "d3": "^5.15.0", - "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 07d6fc4..b38ab10 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,7 +15,6 @@ const DEFAULT_INNER_RADIUS = 52; const DEFAULT_OUTER_RADIUS = 72; const STOPS_CIRCLE_WIDTH = 8; const DEFAULT_VALUE_TEXT_FONT_SIZE = 16; -const DEFAULT_VALUE_TEXT_Decimals = 2; const VALUE_TEXT_MARGIN = 10; const DEFAULT_ICON_SIZE = 20; //px @@ -91,7 +90,7 @@ export class ChartwerkGaugePod extends ChartwerkPod Date: Tue, 17 May 2022 17:52:56 +0400 Subject: [PATCH 02/10] 0.5.0-beta --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7275a33..e16246a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.4.2", + "version": "0.5.0-beta", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { From e77b15e5d83e006fc83157946adb89a9de43c547 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 18:01:04 +0400 Subject: [PATCH 03/10] fix --- package.json | 2 +- src/index.ts | 6 +- yarn.lock | 234 +-------------------------------------------------- 3 files changed, 8 insertions(+), 234 deletions(-) diff --git a/package.json b/package.json index e16246a..6b64762 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "author": "CorpGlory", "license": "Apache-2.0", "dependencies": { - "@chartwerk/core": "^0.5.0-beta" + "@chartwerk/core": "^0.5.0-beta2" }, "devDependencies": { "css-loader": "^3.4.2", diff --git a/src/index.ts b/src/index.ts index b38ab10..2cdd5aa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -283,7 +283,7 @@ export class ChartwerkGaugePod extends ChartwerkPod { - return this.d3.scaleLinear() + return d3.scaleLinear() .domain([this.options.minValue, this.options.maxValue]) .range([(-1 * Math.PI) / 2 - CIRCLES_ROUNDING, Math.PI / 2 + CIRCLES_ROUNDING]); } @@ -307,7 +307,7 @@ export class ChartwerkGaugePod extends ChartwerkPod this.onDrag(idx)) .on('end', () => this.onDragEnd(idx)); @@ -326,7 +326,7 @@ export class ChartwerkGaugePod extends ChartwerkPod Date: Tue, 17 May 2022 18:01:10 +0400 Subject: [PATCH 04/10] 0.5.0-beta2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b64762..cb31c57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.5.0-beta", + "version": "0.5.0-beta2", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { From d80243fbee87d3d0fc6226be6c154475835e6057 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 18:18:44 +0400 Subject: [PATCH 05/10] external d3 and lodash --- build/prod.webpack.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/prod.webpack.conf.js b/build/prod.webpack.conf.js index e30710d..4bee62f 100644 --- a/build/prod.webpack.conf.js +++ b/build/prod.webpack.conf.js @@ -3,7 +3,7 @@ const baseWebpackConfig = require('./base.webpack.conf'); var conf = baseWebpackConfig; conf.mode = 'production'; conf.externals = [ - '@chartwerk/core' + '@chartwerk/core', 'd3', 'lodash', ]; module.exports = baseWebpackConfig; From f3106d0877891cb0eca8c6c60cfdeb6f2fec25fb Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 18:18:53 +0400 Subject: [PATCH 06/10] 0.5.0-beta3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb31c57..7e35b07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.5.0-beta2", + "version": "0.5.0-beta3", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { From a87edb023e3d8b7a211864124556b41062af78da Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:04:36 +0400 Subject: [PATCH 07/10] upd core --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7e35b07..aba7d78 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "author": "CorpGlory", "license": "Apache-2.0", "dependencies": { - "@chartwerk/core": "^0.5.0-beta2" + "@chartwerk/core": "^0.5.0-beta3" }, "devDependencies": { "css-loader": "^3.4.2", diff --git a/yarn.lock b/yarn.lock index d7af5b0..bc28d7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,12 @@ # yarn lockfile v1 -"@chartwerk/core@^0.5.0-beta2": - version "0.5.0-beta2" - resolved "https://registry.yarnpkg.com/@chartwerk/core/-/core-0.5.0-beta2.tgz#2b8595682c101fb7dd0e956c4e2eac465cccd7f7" - integrity sha512-8y9EKg4fDOU0DQiZbNv/aHPRpjDFkpIq+jL5SDN9nofnDUzWt5BNt3I8sRSU1GOCrpPfmKZ4Bo3FjgrcwrfteQ== +"@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== dependencies: - d3 "^5.16.0" + d3 "^5.7.2" lodash "^4.17.21" "@types/json-schema@^7.0.5": @@ -966,7 +966,7 @@ d3-zoom@1: d3-selection "1" d3-transition "1" -d3@^5.16.0: +d3@^5.7.2: version "5.16.0" resolved "https://registry.yarnpkg.com/d3/-/d3-5.16.0.tgz#9c5e8d3b56403c79d4ed42fbd62f6113f199c877" integrity sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw== From 04a4fb3fd69217a8433fc9e2ec4c2fd527e37b2f Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:04:49 +0400 Subject: [PATCH 08/10] 0.5.0-beta4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aba7d78..21bc8e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.5.0-beta3", + "version": "0.5.0-beta4", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": { From b7009d193366b85f89e1f27f24c4caebce96de07 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:33:06 +0400 Subject: [PATCH 09/10] upd core --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 21bc8e1..d08af53 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,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 bc28d7d..4bfc2c8 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.6" @@ -1799,7 +1799,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 512df4df1546f26f6c371c6a6fe490e9fbd2c874 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 May 2022 19:33:25 +0400 Subject: [PATCH 10/10] 0.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d08af53..45678ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.5.0-beta4", + "version": "0.5.0", "description": "Chartwerk gauge pod", "main": "dist/index.js", "scripts": {