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", "version": "2.3.0",
"type": "module", "type": "module",
"private": true, "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": { "scripts": {
"dev": "svelte-kit dev", "dev": "svelte-kit dev",
"build": "svelte-kit build", "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> <a href="https://techblog.babyl.ca">Yanick Champoux</a>
. Code available on . Code available on
<!-- TODO read the url from package.json --> <!-- 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> </p>
<style> <style>

View File

@ -7,3 +7,8 @@ test("we have an about page", () => {
const { getByText } = render(About); const { getByText } = render(About);
expect(getByText("Welcome to the docks!")).toBeInTheDocument(); 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 // vite.config.js
import { sveltekit } from "@sveltejs/kit/vite"; import { sveltekit } from "@sveltejs/kit/vite";
import packageJson from "./package.json";
/** @type {import('vite').UserConfig} */ /** @type {import('vite').UserConfig} */
const config = { const config = {
plugins: [sveltekit()], plugins: [sveltekit()],
publicDir: "./static", publicDir: "./static",
ssr: {}, ssr: {},
optimizeDeps: {}, optimizeDeps: {},
define: {
"import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
"import.meta.env.HOMEPAGE": JSON.stringify(packageJson.homepage),
},
}; };
export default config; export default config;