Merge branch 'code-about'

This commit is contained in:
Yanick Champoux 2023-05-04 18:45:58 -04:00
commit f94c3b5c1a
5 changed files with 23 additions and 15 deletions

View File

@ -3,6 +3,14 @@
"version": "2.3.0",
"type": "module",
"private": true,
"repository": {
"type": "git",
"url": "https://git.babyl.ca/aotds/aotds-docks.git"
},
"bugs": {
"url": "https://git.babyl.ca/aotds/aotds-docks/issues"
},
"homepage": "https://git.babyl.ca/aotds/aotds-docks",
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",

View File

@ -1,10 +0,0 @@
import { createStore } from "./index.js";
test("basic, initial store", () => {
const store = createStore();
const state = store.getState();
expect(state).toHaveProperty("propulsion.drive.reqs.mass", 0);
// expect(state).toHaveProperty("structure.cargo.space", 0);
});

View File

@ -30,7 +30,7 @@
<a href="https://techblog.babyl.ca">Yanick Champoux</a>
. Code available on
<!-- TODO read the url from package.json -->
<a href="https://github.com/aotds/aotds-shipyard">Github</a>.
<a href={import.meta.env.HOMEPAGE}>my Gitea instance</a>.
</p>
<style>

View File

@ -7,3 +7,8 @@ test("we have an about page", () => {
const { getByText } = render(About);
expect(getByText("Welcome to the docks!")).toBeInTheDocument();
});
test("link to gitea is there", () => {
const { getByText } = render(About);
expect(getByText("my Gitea instance")).toBeInTheDocument();
});

View File

@ -1,12 +1,17 @@
// vite.config.js
import { sveltekit } from "@sveltejs/kit/vite";
import packageJson from "./package.json";
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()],
publicDir: "./static",
ssr: {},
optimizeDeps: {},
plugins: [sveltekit()],
publicDir: "./static",
ssr: {},
optimizeDeps: {},
define: {
"import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
"import.meta.env.HOMEPAGE": JSON.stringify(packageJson.homepage),
},
};
export default config;