feat: migrate solid to svelte 5

This commit is contained in:
Maciej Jur 2023-12-21 00:29:52 +01:00
parent ea4897230f
commit 4c27201c39
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
6 changed files with 21 additions and 237 deletions

View file

@ -1,6 +1,5 @@
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx'; import mdx from '@astrojs/mdx';
import solid from '@astrojs/solid-js';
import svelte from '@astrojs/svelte'; import svelte from '@astrojs/svelte';
import pagefind from 'astro-pagefind'; import pagefind from 'astro-pagefind';
import remarkDirective from 'remark-directive'; import remarkDirective from 'remark-directive';
@ -28,7 +27,7 @@ export default defineConfig({
], ],
rehypePlugins: [ rehypePlugins: [
// https://katex.org/docs/options.html // https://katex.org/docs/options.html
[rehypeKatex, {output: 'mathml'}], [rehypeKatex, { output: 'mathml' }],
], ],
shikiConfig: { shikiConfig: {
theme: 'min-light' theme: 'min-light'
@ -37,7 +36,6 @@ export default defineConfig({
integrations: [ integrations: [
mdx(), mdx(),
svelte({ compilerOptions: { runes: true } }), svelte({ compilerOptions: { runes: true } }),
solid(),
pagefind(), pagefind(),
] ]
}); });

View file

@ -12,7 +12,6 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^2.0.1", "@astrojs/mdx": "^2.0.1",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^5.0.1", "@astrojs/svelte": "^5.0.1",
"@citation-js/plugin-bibtex": "^0.7.2", "@citation-js/plugin-bibtex": "^0.7.2",
"@js-temporal/polyfill": "^0.4.4", "@js-temporal/polyfill": "^0.4.4",
@ -34,7 +33,6 @@
"remark-parse": "^11.0.0", "remark-parse": "^11.0.0",
"remark-rehype": "^11.0.0", "remark-rehype": "^11.0.0",
"reveal.js": "^5.0.3", "reveal.js": "^5.0.3",
"solid-js": "^1.8.7",
"svelte": "5.0.0-next.26", "svelte": "5.0.0-next.26",
"unified": "^11.0.4", "unified": "^11.0.4",
"unist-util-visit": "^5.0.0" "unist-util-visit": "^5.0.0"

View file

@ -8,9 +8,6 @@ dependencies:
'@astrojs/mdx': '@astrojs/mdx':
specifier: ^2.0.1 specifier: ^2.0.1
version: 2.0.1(astro@4.0.6) version: 2.0.1(astro@4.0.6)
'@astrojs/solid-js':
specifier: ^3.0.2
version: 3.0.2(solid-js@1.8.7)(vite@5.0.10)
'@astrojs/svelte': '@astrojs/svelte':
specifier: ^5.0.1 specifier: ^5.0.1
version: 5.0.1(astro@4.0.6)(svelte@5.0.0-next.26)(typescript@5.3.3)(vite@5.0.10) version: 5.0.1(astro@4.0.6)(svelte@5.0.0-next.26)(typescript@5.3.3)(vite@5.0.10)
@ -74,9 +71,6 @@ dependencies:
reveal.js: reveal.js:
specifier: ^5.0.3 specifier: ^5.0.3
version: 5.0.3 version: 5.0.3
solid-js:
specifier: ^1.8.7
version: 1.8.7
svelte: svelte:
specifier: 5.0.0-next.26 specifier: 5.0.0-next.26
version: 5.0.0-next.26 version: 5.0.0-next.26
@ -182,19 +176,6 @@ packages:
prismjs: 1.29.0 prismjs: 1.29.0
dev: false dev: false
/@astrojs/solid-js@3.0.2(solid-js@1.8.7)(vite@5.0.10):
resolution: {integrity: sha512-BGTtS/ygAlcopELdjgTURHnxS2AoDRKjpu3Dgp12TOcArBMCiI/rYdHtlB+ligMm9Bbvar8qdzXsT1zlrxK5jQ==}
engines: {node: '>=18.14.1'}
peerDependencies:
solid-js: ^1.4.3
dependencies:
solid-js: 1.8.7
vite-plugin-solid: 2.8.0(solid-js@1.8.7)(vite@5.0.10)
transitivePeerDependencies:
- supports-color
- vite
dev: false
/@astrojs/svelte@5.0.1(astro@4.0.6)(svelte@5.0.0-next.26)(typescript@5.3.3)(vite@5.0.10): /@astrojs/svelte@5.0.1(astro@4.0.6)(svelte@5.0.0-next.26)(typescript@5.3.3)(vite@5.0.10):
resolution: {integrity: sha512-MQvm0VmkiHVBb41hkKvQKtZa2YZqImdJD23dDW6EGhFxRy1GEgJ4Hm6p4T30FXrLPQUoiay/BU5U/lHDd6ZlNg==} resolution: {integrity: sha512-MQvm0VmkiHVBb41hkKvQKtZa2YZqImdJD23dDW6EGhFxRy1GEgJ4Hm6p4T30FXrLPQUoiay/BU5U/lHDd6ZlNg==}
engines: {node: '>=18.14.1'} engines: {node: '>=18.14.1'}
@ -291,24 +272,6 @@ packages:
semver: 6.3.1 semver: 6.3.1
dev: false dev: false
/@babel/helper-create-class-features-plugin@7.23.6(@babel/core@7.23.6):
resolution: {integrity: sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
'@babel/helper-member-expression-to-functions': 7.23.0
'@babel/helper-optimise-call-expression': 7.22.5
'@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.6)
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
semver: 6.3.1
dev: false
/@babel/helper-environment-visitor@7.22.20: /@babel/helper-environment-visitor@7.22.20:
resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -329,20 +292,6 @@ packages:
'@babel/types': 7.23.6 '@babel/types': 7.23.6
dev: false dev: false
/@babel/helper-member-expression-to-functions@7.23.0:
resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.6
dev: false
/@babel/helper-module-imports@7.18.6:
resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.6
dev: false
/@babel/helper-module-imports@7.22.15: /@babel/helper-module-imports@7.22.15:
resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -364,30 +313,11 @@ packages:
'@babel/helper-validator-identifier': 7.22.20 '@babel/helper-validator-identifier': 7.22.20
dev: false dev: false
/@babel/helper-optimise-call-expression@7.22.5:
resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.6
dev: false
/@babel/helper-plugin-utils@7.22.5: /@babel/helper-plugin-utils@7.22.5:
resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
dev: false dev: false
/@babel/helper-replace-supers@7.22.20(@babel/core@7.23.6):
resolution: {integrity: sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-member-expression-to-functions': 7.23.0
'@babel/helper-optimise-call-expression': 7.22.5
dev: false
/@babel/helper-simple-access@7.22.5: /@babel/helper-simple-access@7.22.5:
resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -395,13 +325,6 @@ packages:
'@babel/types': 7.23.6 '@babel/types': 7.23.6
dev: false dev: false
/@babel/helper-skip-transparent-expression-wrappers@7.22.5:
resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.6
dev: false
/@babel/helper-split-export-declaration@7.22.6: /@babel/helper-split-export-declaration@7.22.6:
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -462,28 +385,6 @@ packages:
'@babel/helper-plugin-utils': 7.22.5 '@babel/helper-plugin-utils': 7.22.5
dev: false dev: false
/@babel/plugin-syntax-typescript@7.23.3(@babel/core@7.23.6):
resolution: {integrity: sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
dev: false
/@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.23.6):
resolution: {integrity: sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-simple-access': 7.22.5
dev: false
/@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.23.6): /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.23.6):
resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -498,33 +399,6 @@ packages:
'@babel/types': 7.23.6 '@babel/types': 7.23.6
dev: false dev: false
/@babel/plugin-transform-typescript@7.23.6(@babel/core@7.23.6):
resolution: {integrity: sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-create-class-features-plugin': 7.23.6(@babel/core@7.23.6)
'@babel/helper-plugin-utils': 7.22.5
'@babel/plugin-syntax-typescript': 7.23.3(@babel/core@7.23.6)
dev: false
/@babel/preset-typescript@7.23.3(@babel/core@7.23.6):
resolution: {integrity: sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-validator-option': 7.23.5
'@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.6)
'@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.6)
'@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.6)
dev: false
/@babel/template@7.22.15: /@babel/template@7.22.15:
resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -1652,28 +1526,6 @@ packages:
dev: false dev: false
optional: true optional: true
/babel-plugin-jsx-dom-expressions@0.37.9(@babel/core@7.23.6):
resolution: {integrity: sha512-6w+zs2i14fVanj4e1hXCU5cp+x0U0LJ5jScknpMZZUteHhwFRGJflHMVJ+xAcW7ku41FYjr7DgtK9mnc2SXlJg==}
peerDependencies:
'@babel/core': ^7.20.12
dependencies:
'@babel/core': 7.23.6
'@babel/helper-module-imports': 7.18.6
'@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.6)
'@babel/types': 7.23.6
html-entities: 2.3.3
validate-html-nesting: 1.2.2
dev: false
/babel-preset-solid@1.8.6(@babel/core@7.23.6):
resolution: {integrity: sha512-Ened42CHjU4EFkvNeS042/3Pm21yvMWn8p4G4ddzQTlKaMwSGGD1VciA/e7EshBVHJCcBj9vHiUd/r3A4qLPZA==}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.23.6
babel-plugin-jsx-dom-expressions: 0.37.9(@babel/core@7.23.6)
dev: false
/bail@2.0.2: /bail@2.0.2:
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
dev: false dev: false
@ -1956,10 +1808,6 @@ packages:
which: 2.0.2 which: 2.0.2
dev: false dev: false
/csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
dev: false
/debug@2.6.9: /debug@2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies: peerDependencies:
@ -2564,10 +2412,6 @@ packages:
space-separated-tokens: 2.0.2 space-separated-tokens: 2.0.2
dev: false dev: false
/html-entities@2.3.3:
resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==}
dev: false
/html-escaper@3.0.3: /html-escaper@3.0.3:
resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==}
dev: false dev: false
@ -2724,11 +2568,6 @@ packages:
engines: {node: '>=12'} engines: {node: '>=12'}
dev: false dev: false
/is-what@4.1.16:
resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
engines: {node: '>=12.13'}
dev: false
/is-wsl@3.1.0: /is-wsl@3.1.0:
resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
engines: {node: '>=16'} engines: {node: '>=16'}
@ -3118,13 +2957,6 @@ packages:
'@types/mdast': 4.0.3 '@types/mdast': 4.0.3
dev: false dev: false
/merge-anything@5.1.7:
resolution: {integrity: sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==}
engines: {node: '>=12.13'}
dependencies:
is-what: 4.1.16
dev: false
/merge-stream@2.0.0: /merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
dev: false dev: false
@ -4229,11 +4061,6 @@ packages:
dependencies: dependencies:
lru-cache: 6.0.0 lru-cache: 6.0.0
/seroval@0.15.1:
resolution: {integrity: sha512-OPVtf0qmeC7RW+ScVX+7aOS+xoIM7pWcZ0jOWg2aTZigCydgRB04adfteBRbecZnnrO1WuGQ+C3tLeBBzX2zSQ==}
engines: {node: '>=10'}
dev: false
/server-destroy@1.0.1: /server-destroy@1.0.1:
resolution: {integrity: sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==} resolution: {integrity: sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==}
dev: false dev: false
@ -4352,24 +4179,6 @@ packages:
unicode-emoji-modifier-base: 1.0.0 unicode-emoji-modifier-base: 1.0.0
dev: false dev: false
/solid-js@1.8.7:
resolution: {integrity: sha512-9dzrSVieh2zj3SnJ02II6xZkonR6c+j/91b7XZUNcC6xSaldlqjjGh98F1fk5cRJ8ZTkzqF5fPIWDxEOs6QZXA==}
dependencies:
csstype: 3.1.3
seroval: 0.15.1
dev: false
/solid-refresh@0.5.3(solid-js@1.8.7):
resolution: {integrity: sha512-Otg5it5sjOdZbQZJnvo99TEBAr6J7PQ5AubZLNU6szZzg3RQQ5MX04oteBIIGDs0y2Qv8aXKm9e44V8z+UnFdw==}
peerDependencies:
solid-js: ^1.3
dependencies:
'@babel/generator': 7.23.6
'@babel/helper-module-imports': 7.22.15
'@babel/types': 7.23.6
solid-js: 1.8.7
dev: false
/source-map-js@1.0.2: /source-map-js@1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -4817,10 +4626,6 @@ packages:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: false dev: false
/validate-html-nesting@1.2.2:
resolution: {integrity: sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==}
dev: false
/vfile-location@5.0.2: /vfile-location@5.0.2:
resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==} resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==}
dependencies: dependencies:
@ -4859,25 +4664,6 @@ packages:
vfile-message: 4.0.2 vfile-message: 4.0.2
dev: false dev: false
/vite-plugin-solid@2.8.0(solid-js@1.8.7)(vite@5.0.10):
resolution: {integrity: sha512-n5FAm7ZmTl94VWUoiJCgG7bouF2NlC9CA1wY/qbVnkFbYDWk++bFWyNoU48aLJ+lMtzNeYzJypJXOHzFKxL9xA==}
peerDependencies:
solid-js: ^1.7.2
vite: ^3.0.0 || ^4.0.0 || ^5.0.0
dependencies:
'@babel/core': 7.23.6
'@babel/preset-typescript': 7.23.3(@babel/core@7.23.6)
'@types/babel__core': 7.20.5
babel-preset-solid: 1.8.6(@babel/core@7.23.6)
merge-anything: 5.1.7
solid-js: 1.8.7
solid-refresh: 0.5.3(solid-js@1.8.7)
vite: 5.0.10(sass@1.69.5)
vitefu: 0.2.5(vite@5.0.10)
transitivePeerDependencies:
- supports-color
dev: false
/vite@5.0.10(sass@1.69.5): /vite@5.0.10(sass@1.69.5):
resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}

View file

@ -0,0 +1,4 @@
---
import SizeChart from './SizeChart.svelte';
---
<SizeChart client:load/>

View file

@ -1,6 +1,6 @@
import { Maybe } from "purify-ts"; <script lang="ts">
import { onMount } from "solid-js";
import Chart from "chart.js/auto"; import Chart from "chart.js/auto";
import { Maybe } from "purify-ts";
const data = { const data = {
@ -35,17 +35,15 @@ const options = {
} }
}; };
export default function ProjectSizeChart() { $effect(() => {
Maybe
onMount(() => Maybe
.fromNullable(document.getElementById("project-size-chart") as HTMLCanvasElement) .fromNullable(document.getElementById("project-size-chart") as HTMLCanvasElement)
.chainNullable(e => e.getContext("2d")) .chainNullable(e => e.getContext("2d"))
.ifJust(ctx => new Chart(ctx, { type: "line", data, options })) .ifJust(ctx => new Chart(ctx, { type: "line", data, options }))
) })
</script>
return (
<div style="width: 100%; height: 16em"> <div style="width: 100%; height: 16em">
<canvas id="project-size-chart"></canvas> <canvas id="project-size-chart"></canvas>
</div> </div>
)
}

View file

@ -2,15 +2,15 @@
layout: ../../layouts/Wiki.astro layout: ../../layouts/Wiki.astro
title: Wiki home page title: Wiki home page
--- ---
import ProjectSizeChart from '@assets/wiki/ProjectSizeChart'; import ProjectSizeChart from '@components/wiki/SizeChart.astro';
Welcome! In this wiki I'll write about various things which don't really fit into any other place.
This wiki is very much inspired by [Nikita Voloboev's wiki](https://wiki.nikiv.dev/), as well as [Gwern Branwen's really amazing website](https://gwern.net/), and I do really mean it! It's a marvel.
But these are only some of the inspirations which I am always on the lookout for.
Welcome! In this wiki I'll write about various things which don't really fit into any other place. This wiki is very much inspired by [Nikita Voloboev's wiki](https://wiki.nikiv.dev/), as well as [Gwern Branwen's really amazing website](https://gwern.net/), and I do really mean it! It's a marvel. But these are only some of the inspirations which I am always on the lookout for.
## Project size ## Project size
The following chart displays the number of lines of code categorized by file extension within the repository of this website. The following chart displays the number of lines of code categorized by file extension within the repository of this website.
<ProjectSizeChart client:load /> <ProjectSizeChart/>