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..4bee62f 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', 'd3', 'lodash', +]; 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..45678ab 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,20 @@ { "name": "@chartwerk/gauge-pod", - "version": "0.4.2", + "version": "0.5.0", "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" }, "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..2cdd5aa 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