Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,23 @@ jobs:
- uses: jetli/wasm-pack-action@v0.4.0

- name: Build wasm (target web)
working-directory: wasm_project
working-directory: wasm
run: wasm-pack build --release --target web

- name: Prepare dist
run: |
set -euo pipefail
mkdir -p "$DIST_DIR"
cp index.html "$DIST_DIR/"
cp -r js "$DIST_DIR/js"
cp gif.js "$DIST_DIR/gif.js"
cp gif.worker.js "$DIST_DIR/gif.worker.js"
mkdir -p "$DIST_DIR/wasm_project"
cp -r wasm_project/pkg "$DIST_DIR/wasm_project/pkg"
if [ -d test/images ]; then
cp web/index.html "$DIST_DIR/"
mkdir -p "$DIST_DIR/js"
cp -r web/js/* "$DIST_DIR/js/"
mkdir -p "$DIST_DIR/vendor"
cp -r web/vendor/* "$DIST_DIR/vendor/"
mkdir -p "$DIST_DIR/wasm/pkg"
cp -r wasm/pkg/* "$DIST_DIR/wasm/pkg/"
if [ -d web/test/images ]; then
mkdir -p "$DIST_DIR/test/images"
cp -r test/images/* "$DIST_DIR/test/images/"
cp -r web/test/images/* "$DIST_DIR/test/images/"
fi
touch "$DIST_DIR/.nojekyll"

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/wasm/target/
/wasm/pkg/

.DS_Store
File renamed without changes.
18 changes: 9 additions & 9 deletions wasm_project/Cargo.lock → wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions wasm_project/Cargo.toml → wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "wasm_project"
name = "wasm"
version = "0.1.0"
edition = "2021"
edition = "2024"

[lib]
crate-type = ["cdylib"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion wasm_project/.gitignore

This file was deleted.

Empty file removed wasm_project/pkg/.gitignore
Empty file.
12 changes: 0 additions & 12 deletions wasm_project/pkg/package.json

This file was deleted.

77 changes: 0 additions & 77 deletions wasm_project/pkg/wasm_project.d.ts

This file was deleted.

Loading