Skip to content

Commit

Permalink
chore: build cleanup, include homepage (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle authored Nov 17, 2024
1 parent 2c83995 commit f25dcba
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 5 deletions.
80 changes: 80 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "chartjs-plugin-zoom",
"homepage": "https://www.chartjs.org/chartjs-plugin-zoom/",
"description": "Plugin that enables zoom and pan functionality in Chart.js charts.",
"version": "2.0.1",
"license": "MIT",
Expand Down Expand Up @@ -69,6 +70,7 @@
"ng-hammerjs": "^2.0.8",
"pixelmatch": "^5.2.1",
"rollup": "^4.12.1",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-istanbul": "^5.0.0",
"typedoc": "^0.26.11",
"typedoc-plugin-markdown": "^4.2.10",
Expand Down
13 changes: 8 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const commonjs = require('@rollup/plugin-commonjs');
const cleanup = require('rollup-plugin-cleanup');
const json = require('@rollup/plugin-json');
const nodeResolve = require('@rollup/plugin-node-resolve');
const resolve = require('@rollup/plugin-node-resolve');
const terser = require('@rollup/plugin-terser');

const pkg = require('./package.json');
Expand All @@ -10,7 +11,7 @@ const allDependencies = dependencies.concat(peerDependencies);

const banner = `/*!
* ${pkg.name} v${pkg.version}
* ${pkg.homepage}
* ${pkg.homepage}${pkg.version}/
* (c) 2016-${(new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear()} chartjs-plugin-zoom Contributors
* Released under the MIT License
*/`;
Expand Down Expand Up @@ -39,7 +40,8 @@ module.exports = [
include: 'node_modules/**',
}),
json(),
nodeResolve(),
resolve(),
cleanup({comments: ['some']}),
],
external: allDependencies
},
Expand All @@ -58,7 +60,7 @@ module.exports = [
include: 'node_modules/**',
}),
json(),
nodeResolve(),
resolve(),
terser({output: {comments: 'some'}})
],
external: allDependencies
Expand All @@ -67,7 +69,8 @@ module.exports = [
input: 'src/index.esm.js',
plugins: [
json(),
nodeResolve()
resolve(),
cleanup({comments: ['some']}),
],
output: {
name,
Expand Down

0 comments on commit f25dcba

Please sign in to comment.