Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,324 changes: 30 additions & 5,294 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "chartjs-gauge",
"description": "Gauge chart for chart.js",
"homepage": "https://github.com/haiiaaa/chartjs-gauge/",
"version": "0.3.0",
"version": "3.0.0",
"licence": "MIT",
"jsdelivr": "dist/chartjs-gauge.min.js",
"unpkg": "dist/chartjs-gauge.min.js",
Expand All @@ -22,7 +22,7 @@
"url": "https://github.com/haiiaaa/chartjs-gauge/issues"
},
"dependencies": {
"chart.js": "^2.8.0"
"chart.js": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.9.0",
Expand All @@ -41,7 +41,8 @@
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-istanbul": "^2.0.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.3.0"
"rollup-plugin-terser": "^5.3.0",
"@rollup/plugin-json": "^4.1.0"
},
"scripts": {
"build": "rollup -c",
Expand Down
31 changes: 18 additions & 13 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
const babel = require('rollup-plugin-babel');
const { terser } = require('rollup-plugin-terser');
const json = require('@rollup/plugin-json');
const pkg = require('./package.json');

const input = 'src/index.js';
const banner = `/*!
* chartjs-gauge.js v${pkg.version}
* ${pkg.homepage}
* (c) ${new Date().getFullYear()} chartjs-gauge.js Contributors
* Released under the MIT License
*/`;

const input = 'src/index.js';
const inputESM = 'src/index.esm.js';
const external = [
'chart.js',
'chart.js/helpers'
];
const globals = {
'chart.js': 'Chart',
'chart.js/helpers': 'Chart.helpers'
};

module.exports = [
// UMD builds (excluding Chart)
// dist/chartjs-gauge.js
Expand All @@ -20,20 +31,17 @@ module.exports = [
babel({
exclude: 'node_modules/**',
}),
json(),
],
output: {
name: 'Gauge',
file: 'dist/chartjs-gauge.js',
banner,
format: 'umd',
indent: false,
globals: {
'chart.js': 'Chart',
},
globals
},
external: [
'chart.js',
],
external
},
{
input,
Expand All @@ -46,18 +54,15 @@ module.exports = [
preamble: banner,
},
}),
json(),
],
output: {
name: 'Gauge',
file: 'dist/chartjs-gauge.min.js',
format: 'umd',
indent: false,
globals: {
'chart.js': 'Chart',
},
globals
},
external: [
'chart.js',
],
external
},
];
Loading