diff --git a/package-lock.json b/package-lock.json index 1b85b3c..6196ce9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,9 @@ "": { "name": "web3privacy-prague", "version": "0.0.1", + "hasInstallScript": true, "devDependencies": { + "@modyfi/vite-plugin-yaml": "^1.0.4", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-static": "^2.0.1", "@sveltejs/kit": "^1.5.0", @@ -439,6 +441,20 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, + "node_modules/@modyfi/vite-plugin-yaml": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@modyfi/vite-plugin-yaml/-/vite-plugin-yaml-1.0.4.tgz", + "integrity": "sha512-qkT0KiR3AQQRfUvDzLv4+1rYAzXj+QmGhAbyUd0Ordf9xynK76i758lk5GiEfxuQxbvdqDaJ9oXkH/KacbSjQQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "5.0.2", + "js-yaml": "4.1.0", + "tosource": "2.0.0-alpha.3" + }, + "peerDependencies": { + "vite": "^2.6.0 || ^3.0.0 || ^4.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -480,6 +496,28 @@ "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", "dev": true }, + "node_modules/@rollup/pluginutils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@sveltejs/adapter-auto": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.0.0.tgz", @@ -560,6 +598,12 @@ "integrity": "sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==", "dev": true }, + "node_modules/@types/estree": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", + "dev": true + }, "node_modules/@types/marked": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.8.tgz", @@ -1277,6 +1321,12 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2569,6 +2619,15 @@ "node": ">=8.0" } }, + "node_modules/tosource": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/tosource/-/tosource-2.0.0-alpha.3.tgz", + "integrity": "sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/totalist": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz", diff --git a/package.json b/package.json index ecde677..ec74b3c 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", - "build-config": "js-yaml data/config.yaml > src/lib/config.json", - "static-config": "cp src/lib/config.json static/config.json", + "build-config": "js-yaml src/lib/config.yaml > static/config.json", "lint": "prettier --plugin-search-dir . --check . && eslint .", "format": "prettier --plugin-search-dir . --write .", - "postinstall": "npm run build-config && npm run static-config" + "postinstall": "npm run build-config" }, "devDependencies": { + "@modyfi/vite-plugin-yaml": "^1.0.4", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-static": "^2.0.1", "@sveltejs/kit": "^1.5.0", diff --git a/data/config.yaml b/src/lib/config.yaml similarity index 96% rename from data/config.yaml rename to src/lib/config.yaml index 270d0ec..fd77424 100644 --- a/data/config.yaml +++ b/src/lib/config.yaml @@ -72,7 +72,7 @@ faq: - title: How do I get to the venue? text: Venue X10 (full name "[Divadlo X10](https://divadlox10.cz)") is located in the centre of Prague near the metro station *Národní Třída* (Line B) and *Můstek* (Line A,C). The address is [Charvátova 10/39, Prague 1, 110 00](https://goo.gl/maps/Yh8qWagnqB1DvK676) ([Google Maps](https://goo.gl/maps/Yh8qWagnqB1DvK676)). - title: Why isn't admission free? - text: + text: We would like to have most of the cost of the event covered by admission fees directly from visitors. We want to be independent of sponsors and reduce the pressure to make it a "sales" or marketing event. people: - id: mykola name: Mykola Siusko diff --git a/src/routes/+layout.js b/src/routes/+layout.js index 9dcee99..f28511c 100644 --- a/src/routes/+layout.js +++ b/src/routes/+layout.js @@ -1,4 +1,4 @@ -import config from '$lib/config.json'; +import config from '$lib/config.yaml'; export async function load({ params, url, fetch }) { return { diff --git a/vite.config.js b/vite.config.js index bbf8c7d..e3085cc 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,10 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; +import ViteYaml from '@modyfi/vite-plugin-yaml'; export default defineConfig({ - plugins: [sveltekit()] + plugins: [ + ViteYaml(), + sveltekit() + ] });