Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit ed3906a

Browse files
committed
Added version to meta section
1 parent d157816 commit ed3906a

File tree

5 files changed

+38
-6
lines changed

5 files changed

+38
-6
lines changed

package-lock.json

Lines changed: 24 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "svelte-app",
2+
"name": "musicforprogramming.ipfs",
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
@@ -10,6 +10,7 @@
1010
},
1111
"devDependencies": {
1212
"@rollup/plugin-commonjs": "^17.0.0",
13+
"@rollup/plugin-json": "^4.1.0",
1314
"@rollup/plugin-node-resolve": "^11.0.0",
1415
"@rollup/plugin-typescript": "^8.0.0",
1516
"@tsconfig/svelte": "^2.0.0",

rollup.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import livereload from 'rollup-plugin-livereload';
55
import { terser } from 'rollup-plugin-terser';
66
import sveltePreprocess from 'svelte-preprocess';
77
import typescript from '@rollup/plugin-typescript';
8+
import json from '@rollup/plugin-json';
89
import css from 'rollup-plugin-css-only';
910

1011
const production = !process.env.ROLLUP_WATCH;
@@ -64,9 +65,12 @@ export default {
6465
commonjs(),
6566
typescript({
6667
sourceMap: !production,
67-
inlineSources: !production
68+
inlineSources: !production,
69+
resolveJsonModule: true,
6870
}),
6971

72+
json(),
73+
7074
// In dev mode, call `npm run start` once
7175
// the bundle has been generated
7276
!production && serve(),

src/sections/MetaSection.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import Link from "../Link.svelte";
33
import Section from "./base/Section.svelte";
4+
import pkgJson from "../../package.json";
45
</script>
56

67
<Section title="Meta">
@@ -32,7 +33,7 @@
3233
<Section title="Shameless plug">
3334
<div class="links-blue">
3435
<Link href="https://github.com/jilleJr/musicforprogramming.ipfs"
35-
>[GitHub]</Link
36+
>[{pkgJson.name} v{pkgJson.version}]</Link
3637
>
3738
<Link href="https://javisst.space/@kalle">[Mastodon]</Link>
3839
<Link href="https://blog.jillejr.tech/">[WriteFreely blog]</Link>

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"extends": "@tsconfig/svelte/tsconfig.json",
33

44
"include": ["src/**/*"],
5-
"exclude": ["node_modules/*", "__sapper__/*", "public/*"]
5+
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
6+
7+
"compilerOptions": {
8+
"resolveJsonModule": true
9+
}
610
}

0 commit comments

Comments
 (0)