Skip to content

Commit 0b46592

Browse files
committed
chore: cleanup source, scripts, and resources
- Removed unused source code and comments - Optimized deploy script and added npm helpers - Fixed missing type exports in Rust worker - Cleaned up public directory and untracked generated files - Verified all tests pass
1 parent b644459 commit 0b46592

20 files changed

+27
-3318
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ worker/rust_ai_core/ml/data/weights/*.json
8787

8888
public/sw.js
8989
worker/rust_ai_core/bindings/
90-
public/ml/data/training/*.json
90+
public/ml/

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type-check": "tsc --noEmit",
1616
"generate:sw": "GITHUB_SHA=$GITHUB_SHA node scripts/generate-sw.js",
1717
"build:wasm": "cd worker && wasm-pack build --release --target web --out-dir ../public/wasm --features wasm",
18-
"build:wasm-assets": "npm run build:wasm && mkdir -p public/ml/data/genetic_params && cp resources/ai/evolved.json public/ml/data/genetic_params/ && mkdir -p public/ml/data/weights && cp public/ml/data/weights/ml_ai_weights_best.json public/ml/data/weights/ml_ai_weights_simple.json",
18+
"build:wasm-assets": "npm run build:wasm && mkdir -p public/ml/data/genetic_params && cp resources/ai/evolved.json public/ml/data/genetic_params/ && mkdir -p public/ml/data/weights && cp resources/ai/ml_ai_weights_best.json public/ml/data/weights/ml_ai_weights_best.json && cp resources/ai/ml_ai_weights_best.json public/ml/data/weights/ml_ai_weights_simple.json",
1919
"build:rust-ai": "cd worker && cargo build --release",
2020
"nuke": "rm -rf .next .open-next .wrangler node_modules package-lock.json && npm install && npm run dev",
2121
"check": "npm run lint && npm run type-check && (cd worker && NUM_GAMES=4 cargo test test_ai_matrix -- --nocapture) && npm run test:coverage && npm run test:e2e",
@@ -45,7 +45,10 @@
4545
"db:migrate": "wrangler d1 migrations apply connect-four-db --remote",
4646
"db:shell": "wrangler d1 execute connect-four-db --interactive",
4747
"logs": "wrangler tail --format pretty",
48-
"prepare": "husky"
48+
"prepare": "husky",
49+
"generate:types": "./scripts/generate-types.sh",
50+
"test:wasm-loading": "node scripts/test-wasm-loading.js",
51+
"utils:convert-model": "python3 scripts/convert_model_for_wasm.py"
4952
},
5053
"dependencies": {
5154
"better-sqlite3": "^12.5.0",

public/ml/data/genetic_params/evolved.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

public/sw.js

Lines changed: 0 additions & 186 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)