Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 1.07 KB

README.md

File metadata and controls

77 lines (53 loc) · 1.07 KB

vault-web

vault-web contains the Web UI for Vault.

Develop

Install dependencies

npm install

Build the WebAssembly package

Look at the README.md in ../vault-wasm.

cd ../vault-wasm
wasm-pack build --target web --out-dir ../vault-web/src/vault-wasm --out-name vault-wasm

Run Vite CLI

vite

Open http://localhost:5173 in your browser.

Check for TypeScript errors

tsc --watch
# or tsc --watch

Build and run

vite build

Run caddy:

caddy run

Optimize SVG icons

find src/assets -name '*.svg' | xargs -n1 scripts/optimize-svg.js

Maintenance

Upgrade dependencies

npm update --save

Upgrade pdf.js

When upgrading pdf.js you have to patch file origin check for the desktop app. Search for file origin does not match viewer.

if (
  fileOrigin !== viewerOrigin &&
  !/^https?:\/\/127.0.0.1$|^https?:\/\/127.0.0.1:|^https?:\/\/localhost$|^https?:\/\/localhost:/.test(
    fileOrigin
  )
) {
  throw new Error("file origin does not match viewer's");
}