From fb6604e19bed1fc894758cd011f2fa0b3500ed3d Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 11 Mar 2023 18:40:29 -0500 Subject: [PATCH] Successfully build documentation and package in web --- docs/index.adoc | 1 + justfile | 9 ++++++--- web-frontend/src/hooks.server.js | 2 +- web-frontend/src/routes/+layout.svelte | 9 +++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/index.adoc b/docs/index.adoc index a2ddd50..c077537 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -10,6 +10,7 @@ == Pages +* link:..[xpin.app] - Go back to the xpin homepage * link:ALGORITHM.html[ALGORITHM] - Algorithm definition * link:DESIGN.html[DESIGN] - Algorithm design documentation * link:WORDLIST.html[WORDLIST] - Wordlist design and implementation diff --git a/justfile b/justfile index 7381d55..9b4e5e2 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,7 @@ -build: fmt rust-build wasm-build js-build +build: fmt js-build -all: clean fmt build docs-build # rust-test +# Rust test needs to be built after because it depends on js-build +all: output-clean fmt build rust-build rust-test rsync -ha ./web-frontend/build/ build/ du -shc build/* | sort -h @@ -10,6 +11,8 @@ rust-test: rust-build: cargo build --all + cargo build -p web --release --target x86_64-unknown-linux-musl + earthly +rust-image wasm-build: wasm-pack build --target web xpin-wasm @@ -22,7 +25,7 @@ js-build: wasm-build docs-build # rsync -ha ./build/docs/ ./web-frontend/static/docs/ yarn --cwd ./web-frontend/ build -clean: +output-clean: rm -vrf build docs-build: diff --git a/web-frontend/src/hooks.server.js b/web-frontend/src/hooks.server.js index 7b3546e..7654255 100644 --- a/web-frontend/src/hooks.server.js +++ b/web-frontend/src/hooks.server.js @@ -1,4 +1,4 @@ -// From https://kit.svelte.dev/docs/migrating#integrations-html-minifier +// From https://kit.svelte.dev/docs/migrating#integrations-html-minifier import { minify } from 'html-minifier'; import { building } from '$app/environment'; diff --git a/web-frontend/src/routes/+layout.svelte b/web-frontend/src/routes/+layout.svelte index 5bab33f..4812c92 100644 --- a/web-frontend/src/routes/+layout.svelte +++ b/web-frontend/src/routes/+layout.svelte @@ -29,8 +29,13 @@