📦 Update to Chart.js v4.0.1

pull/373/head
James Panther 2022-11-21 13:56:13 +11:00
parent 13ad02896e
commit 2aa46c6fee
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
4 changed files with 20 additions and 19 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
{{ end }}
{{/* Chart */}}
{{ if .Page.HasShortcode "chart" }}
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartLib := resources.Get "lib/chart/chart.umd.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
@ -31,6 +31,6 @@
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
{{ .Publish }}
{{ end }}
{{ end }}

View File

@ -3,9 +3,9 @@
"version": "2.4.1",
"description": "Congo theme for Hugo",
"scripts": {
"preinstall": "rimraf assets/vendor",
"preinstall": "rimraf assets/lib",
"postinstall": "vendor-copy",
"assets": "rimraf assets/vendor && vendor-copy",
"assets": "rimraf assets/lib && vendor-copy",
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/congo/ -p 8008",
@ -48,8 +48,8 @@
"to": "assets/lib/mermaid/mermaid.min.js"
},
{
"from": "node_modules/chart.js/dist/chart.min.js",
"to": "assets/lib/chart/chart.min.js"
"from": "node_modules/chart.js/dist/chart.umd.js",
"to": "assets/lib/chart/chart.umd.js"
},
{
"from": "node_modules/katex/dist/katex.min.js",