From c0ea356afd0eec9feb536cd6f3a17654c551e6d2 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Thu, 15 Oct 2020 10:21:45 +0700 Subject: [PATCH] remove the dists and update to new version 1.1.4 --- .gitignore | 5 +++- dist/ReactChartJs.d.ts | 8 ----- dist/ReactChartJs.d.ts.map | 1 - dist/ReactChartJs.js | 41 -------------------------- dist/index.d.ts | 2 -- dist/index.d.ts.map | 1 - dist/index.js | 8 ----- examples/line-chart-example/.gitignore | 3 ++ package.json | 2 +- 9 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 dist/ReactChartJs.d.ts delete mode 100644 dist/ReactChartJs.d.ts.map delete mode 100644 dist/ReactChartJs.js delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.d.ts.map delete mode 100644 dist/index.js diff --git a/.gitignore b/.gitignore index bf0230b..39b8ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ # Error File -yarn-error.log \ No newline at end of file +yarn-error.log + +build +dist \ No newline at end of file diff --git a/dist/ReactChartJs.d.ts b/dist/ReactChartJs.d.ts deleted file mode 100644 index a7c293f..0000000 --- a/dist/ReactChartJs.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ChartConfiguration } from 'chart.js'; -import { FunctionComponent } from 'react'; -interface ReactChartJSProps { - chartConfig?: ChartConfiguration; -} -declare const ReactChartJs: FunctionComponent; -export default ReactChartJs; -//# sourceMappingURL=ReactChartJs.d.ts.map \ No newline at end of file diff --git a/dist/ReactChartJs.d.ts.map b/dist/ReactChartJs.d.ts.map deleted file mode 100644 index cd0b26a..0000000 --- a/dist/ReactChartJs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReactChartJs.d.ts","sourceRoot":"","sources":["../src/ReactChartJs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAc,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAEpE,UAAU,iBAAiB;IACvB,WAAW,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAMD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA4BtD,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/ReactChartJs.js b/dist/ReactChartJs.js deleted file mode 100644 index e3298f9..0000000 --- a/dist/ReactChartJs.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var chart_js_1 = require("chart.js"); -var react_1 = __importStar(require("react")); -var ReactChartJs = function (props) { - var chartConfig = props.chartConfig; - var canvasDomRef = react_1.useRef(); - var chartInstanceRef = react_1.useRef({}); - react_1.useEffect(function () { - var canvasDom = canvasDomRef.current; - var chartInstance = chartInstanceRef.current.chartInstance; - if (chartInstance) { - chartInstance.destroy(); - } - chartInstanceRef.current.chartInstance = new chart_js_1.Chart(canvasDom, chartConfig); - }, [chartConfig]); - return (react_1.default.createElement("div", null, - react_1.default.createElement("canvas", { ref: function (instance) { - canvasDomRef.current = instance; - }, width: "400", height: "200" }))); -}; -exports.default = ReactChartJs; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index f951684..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as ReactChartJs } from "./ReactChartJs"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map deleted file mode 100644 index 0f5c602..0000000 --- a/dist/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 31d7556..0000000 --- a/dist/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReactChartJs = void 0; -var ReactChartJs_1 = require("./ReactChartJs"); -Object.defineProperty(exports, "ReactChartJs", { enumerable: true, get: function () { return __importDefault(ReactChartJs_1).default; } }); diff --git a/examples/line-chart-example/.gitignore b/examples/line-chart-example/.gitignore index 4d29575..1358abe 100644 --- a/examples/line-chart-example/.gitignore +++ b/examples/line-chart-example/.gitignore @@ -21,3 +21,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +build +dist \ No newline at end of file diff --git a/package.json b/package.json index 4b191b2..c165670 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cubetiq/react-chart-js", - "version": "1.1.3", + "version": "1.1.4", "description": "Chart.js for React and TypeScript", "main": "./dist/index.js", "types": "./dist/index.d.ts",