-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ES5 for Chart.bundle.js - fixes #563
- Loading branch information
Showing
7 changed files
with
23,767 additions
and
18,802 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Chart from "chart.js/auto" | ||
import "chartjs-adapter-date-fns" | ||
|
||
export default Chart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "build", | ||
"private": true, | ||
"scripts": { | ||
"build": "rollup -c" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.14", | ||
"@babel/core": "^7.13.14", | ||
"@babel/preset-env": "^7.13.12", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"rollup": "^2.44.0" | ||
}, | ||
"dependencies": { | ||
"chart.js": "3.0.2", | ||
"chartjs-adapter-date-fns": "2.0.0", | ||
"date-fns": "2.19.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import babel from "@rollup/plugin-babel"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
|
||
// use same banner as projects | ||
// 1. https://unpkg.com/[email protected] | ||
// 2. https://unpkg.com/[email protected] | ||
// 3. https://unpkg.com/[email protected] (no banner) | ||
const banner = `/*! | ||
* Chart.js v3.0.2 | ||
* https://www.chartjs.org | ||
* (c) 2021 Chart.js Contributors | ||
* Released under the MIT License | ||
* | ||
* chartjs-adapter-date-fns v2.0.0 | ||
* https://www.chartjs.org | ||
* (c) 2021 chartjs-adapter-date-fns Contributors | ||
* Released under the MIT license | ||
* | ||
* date-fns v2.0.19 | ||
* https://date-fns.org | ||
* (c) 2020 Sasha Koss and Lesha Koss | ||
* Released under the MIT License | ||
*/ | ||
`; | ||
|
||
export default [ | ||
{ | ||
input: "index.js", | ||
output: { | ||
name: "Chart", | ||
file: "../vendor/assets/javascripts/Chart.bundle.js", | ||
format: "umd", | ||
banner: banner | ||
}, | ||
plugins: [ | ||
resolve(), | ||
babel({ | ||
babelHelpers: 'bundled', | ||
presets: [['@babel/preset-env', {targets: 'defaults'}]] | ||
}) | ||
] | ||
} | ||
]; |
Oops, something went wrong.