Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: build cleanup, include homepage #862

Merged
merged 1 commit into from
Nov 17, 2024
Merged
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
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
Loading