Skip to content

Commit

Permalink
fix site build: don't fetch MBD MetricsTable.svelte which no longer e…
Browse files Browse the repository at this point in the history
…xists at that location
  • Loading branch information
janosh committed Nov 16, 2024
1 parent cbbbf99 commit 0cb93e6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
1 change: 0 additions & 1 deletion site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ node_modules
.svelte-kit
build
src/routes/api/*.md
src/MetricsTable.svelte
36 changes: 18 additions & 18 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@
"changelog": "npx auto-changelog --package --output ../changelog.md --hide-credit --commit-limit false"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.5.17",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"eslint": "^9.5.0",
"eslint-plugin-svelte": "^2.41.0",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "^2.8.1",
"@sveltejs/vite-plugin-svelte": "^4.0.1",
"eslint": "^9.15.0",
"eslint-plugin-svelte": "^2.46.0",
"hastscript": "^9.0.0",
"mdsvex": "^0.11.2",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.5",
"mdsvex": "^0.12.3",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.8",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
"svelte": "^4.2.18",
"svelte-check": "^3.8.4",
"svelte-multiselect": "^10.3.0",
"svelte-preprocess": "^6.0.1",
"svelte": "^5.2.1",
"svelte-check": "^4.0.8",
"svelte-multiselect": "11.0.0-rc.1",
"svelte-preprocess": "^6.0.3",
"svelte-toc": "^0.5.9",
"svelte-zoo": "^0.4.10",
"svelte2tsx": "^0.7.13",
"tslib": "^2.6.3",
"typescript": "^5.5.2",
"typescript-eslint": "^7.14.1",
"vite": "^5.3.1"
"svelte-zoo": "^0.4.13",
"svelte2tsx": "^0.7.25",
"tslib": "^2.8.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0",
"vite": "^5.4.11"
},
"prettier": {
"semi": false,
Expand Down
5 changes: 1 addition & 4 deletions site/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<script lang="ts">
import Readme from '$root/README.md'
import MetricsTable from '$src/MetricsTable.svelte'
</script>

<main>
<Readme>
<MetricsTable slot="metrics-table" />
</Readme>
<Readme />
</main>

<style>
Expand Down
10 changes: 0 additions & 10 deletions site/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite'
import * as fs from 'fs'
import type { UserConfig } from 'vite'

// fetch latest Matbench Discovery metrics table at build time and save to src/ dir
await fetch(
`https://github.com/janosh/matbench-discovery/raw/main/site/src/figs/metrics-table-uniq-protos.svelte`,
)
.then((res) => res.text())
.then((text) => {
fs.writeFileSync(`src/MetricsTable.svelte`, text)
})

export default {
plugins: [sveltekit()],

Expand Down

0 comments on commit 0cb93e6

Please sign in to comment.