Skip to content

Commit

Permalink
Website now uses packagejson version (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 authored Apr 27, 2024
1 parent b483f45 commit 4177005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/docs/components/PageHeader/PageHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { version } from '$app/environment';
import { drawer } from '$docs/stores.svelte';
// Icons
Expand Down Expand Up @@ -26,7 +27,7 @@
class="btn-rose-sm"
target="_blank"
>
v1.0.0
v{version}
</a>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { readFileSync } from 'node:fs';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand All @@ -8,6 +9,9 @@ const config = {
adapter: adapter(),
alias: {
$docs: './src/docs'
},
version: {
name: JSON.parse(readFileSync('./package.json')).version ?? '0.0.0'
}
}
};
Expand Down

0 comments on commit 4177005

Please sign in to comment.