File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,17 +34,20 @@ jobs:
3434 node-version : 22
3535 cache : pnpm
3636
37- - name : Build WASM
37+ - name : Install TinyGo
3838 run : |
39- GOOS=js GOARCH=wasm go build -ldflags="-s -w" -trimpath -o gnata.wasm ./wasm/
40- cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" wasm_exec.js
41- # LSP WASM ships pre-built in @gnata-sqlite/react
42- cp react/wasm/gnata-lsp.wasm gnata-lsp.wasm
43- cp react/ wasm/lsp-wasm_exec.js lsp-wasm_exec.js
39+ wget -q https://github.com/tinygo-org/tinygo/releases/download/v0.40.1/tinygo_0.40.1_amd64.deb -O /tmp/tinygo.deb
40+ sudo dpkg -i /tmp/tinygo.deb
41+
42+ - name : Build WASM
43+ run : make wasm
4444
4545 - name : Install dependencies
4646 run : pnpm install --frozen-lockfile
4747
48+ - name : Stage WASM into react package
49+ run : make stage-wasm-only
50+
4851 - name : Build React widget
4952 run : cd react && pnpm run build
5053
Original file line number Diff line number Diff line change @@ -10,7 +10,3 @@ node_modules/
1010editor /codemirror /dist /
1111lsp-wasm_exec.js
1212wasm_exec.js
13-
14- # Ship pre-built LSP WASM in the react package
15- ! react /wasm /gnata-lsp.wasm
16- ! react /wasm /lsp-wasm_exec.js
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export function RootLayout() {
4747 const progressFadeTimer = useRef < ReturnType < typeof setTimeout > | null > ( null ) ;
4848
4949 const location = useLocation ( ) ;
50- const mode = location . pathname === '/gnata' ? 'gnata' : 'sqlite' ;
50+ const mode = location . pathname . replace ( / \/ $ / , '' ) === '/gnata' ? 'gnata' : 'sqlite' ;
5151
5252 useEffect ( ( ) => {
5353 document . documentElement . setAttribute ( 'data-theme' , theme ) ;
You can’t perform that action at this time.
0 commit comments