This commit is contained in:
Andras Schmelczer 2025-06-19 20:31:28 +01:00
commit 2884311b62
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 11 additions and 8 deletions

View file

@ -25,13 +25,11 @@ jobs:
- name: Setup rust - name: Setup rust
run: | run: |
cargo install sqlx-cli wasm-pack cargo-machete cargo install wasm-pack cargo-machete
sqlx database create --database-url sqlite://db.sqlite3
sqlx migrate run --source sync_server/src/app_state/database/migrations --database-url sqlite://db.sqlite3
- name: Build wasm - name: Build wasm
run: | run: |
wasm-pack build --target web wasm-pack build --target web --features wasm
- name: Lint - name: Lint
run: | run: |
@ -42,4 +40,4 @@ jobs:
- name: Test - name: Test
run: | run: |
cargo test --verbose -- --include-ignored cargo test --verbose -- --include-ignored
wasm-pack test --node wasm-pack test --node --features wasm

View file

@ -30,7 +30,7 @@ jobs:
- name: Build wasm - name: Build wasm
run: | run: |
cargo install wasm-pack cargo install wasm-pack
wasm-pack build --target web wasm-pack build --target web --features wasm
cp -R pkg/reconcile.js examples/website/ cp -R pkg/reconcile.js examples/website/
cp -R pkg/reconcile_bg.wasm examples/website/ cp -R pkg/reconcile_bg.wasm examples/website/

View file

@ -1,8 +1,12 @@
#!/bin/bash #!/bin/bash
rm -rf pkg
wasm-pack build --target web --features wasm
cp -R pkg/reconcile.js examples/website/ cp -R pkg/reconcile.js examples/website/
cp -R pkg/reconcile_bg.wasm examples/website/ cp -R pkg/reconcile_bg.wasm examples/website/
cd examples/website/ cd examples/website/
python3 -m http.server $1 python3 -m http.server $1

View file

@ -1,4 +1,5 @@
use insta::assert_debug_snapshot; #![cfg(feature = "wasm")]
use reconcile::wasm::{ use reconcile::wasm::{
cursor::{JsCursorPosition, JsTextWithCursors}, cursor::{JsCursorPosition, JsTextWithCursors},
lib::{is_binary, is_file_type_mergable, merge, merge_text, merge_text_with_cursors}, lib::{is_binary, is_file_type_mergable, merge, merge_text, merge_text_with_cursors},