mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Include version in Chart (#7129)
* Include version in Chart * Remove commonjs
This commit is contained in:
parent
bd4537cae4
commit
65425a5cb6
26
package-lock.json
generated
26
package-lock.json
generated
@ -2282,6 +2282,32 @@
|
||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.1.3.tgz",
|
||||
"integrity": "sha512-AEYY1u0xlvb7gyT1Dfe4cg6Brfk7ymmyFJkx2KUIIf/u+lvOPhvUqSwNYMEtBCrEO6KW2Iqtdy174HNa9R51Sg=="
|
||||
},
|
||||
"@rollup/plugin-json": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.0.2.tgz",
|
||||
"integrity": "sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"@rollup/pluginutils": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.8.tgz",
|
||||
"integrity": "sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"estree-walker": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
|
||||
"integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "0.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||
|
@ -34,6 +34,7 @@
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||
"@babel/plugin-transform-object-assign": "^7.8.3",
|
||||
"@babel/preset-env": "^7.8.4",
|
||||
"@rollup/plugin-json": "^4.0.2",
|
||||
"babel-plugin-istanbul": "^6.0.0",
|
||||
"babel-preset-es2015-rollup": "^3.0.0",
|
||||
"coveralls": "^3.0.9",
|
||||
|
@ -5,6 +5,7 @@ const resolve = require('rollup-plugin-node-resolve');
|
||||
const babel = require('rollup-plugin-babel');
|
||||
const cleanup = require('rollup-plugin-cleanup');
|
||||
const terser = require('rollup-plugin-terser').terser;
|
||||
const json = require('@rollup/plugin-json');
|
||||
const optional = require('./rollup.plugins').optional;
|
||||
const pkg = require('./package.json');
|
||||
|
||||
@ -24,6 +25,7 @@ module.exports = [
|
||||
{
|
||||
input,
|
||||
plugins: [
|
||||
json(),
|
||||
resolve(),
|
||||
babel(),
|
||||
optional({
|
||||
@ -50,6 +52,7 @@ module.exports = [
|
||||
{
|
||||
input,
|
||||
plugins: [
|
||||
json(),
|
||||
resolve(),
|
||||
babel(),
|
||||
optional({
|
||||
@ -81,6 +84,7 @@ module.exports = [
|
||||
{
|
||||
input,
|
||||
plugins: [
|
||||
json(),
|
||||
resolve(),
|
||||
babel(),
|
||||
cleanup({
|
||||
@ -104,6 +108,7 @@ module.exports = [
|
||||
{
|
||||
input,
|
||||
plugins: [
|
||||
json(),
|
||||
resolve(),
|
||||
babel(),
|
||||
terser({
|
||||
|
@ -8,6 +8,8 @@ import {BasicPlatform, DomPlatform} from '../platform/platforms';
|
||||
import plugins from './core.plugins';
|
||||
import scaleService from '../core/core.scaleService';
|
||||
import {getMaximumWidth, getMaximumHeight} from '../helpers/helpers.dom';
|
||||
// @ts-ignore
|
||||
import {version} from '../../package.json';
|
||||
|
||||
/**
|
||||
* @typedef { import("../platform/platform.base").IEvent } IEvent
|
||||
@ -172,6 +174,8 @@ function getCanvas(item) {
|
||||
}
|
||||
|
||||
class Chart {
|
||||
static version = version;
|
||||
|
||||
constructor(item, config) {
|
||||
const me = this;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user