Skip to content

Refactor project source layout#94

Merged
dsafdsaf132 merged 2 commits into
mainfrom
codex/refactor-project-structure
Jul 1, 2026
Merged

Refactor project source layout#94
dsafdsaf132 merged 2 commits into
mainfrom
codex/refactor-project-structure

Conversation

@dsafdsaf132

Copy link
Copy Markdown
Owner

Summary

  • Reorganize browser JavaScript files into focused modules:
    • js/core
    • js/loading
    • js/layers
    • js/rendering
    • js/ui
  • Keep js/main.js as a small browser entry point and move GerberViewer into js/core/viewer.js
  • Reorganize Rust/WASM sources into module folders:
    • geometry
    • parser
    • drill
    • interaction
    • renderer
    • util
  • Move inline Rust unit tests into sibling tests.rs files
  • Update README.md, localized READMEs, and wasm/README.md to describe the new module-level structure
  • Update renderer package tests to use the new JS helper paths

Tests

  • cargo test --manifest-path wasm/Cargo.toml
  • npm --prefix packages/wasm-gerber-renderer run check
  • find js packages/wasm-gerber-renderer -type f \( -name '*.js' -o -name '*.mjs' \\) -not -path '*/node_modules/*' -print0 | xargs -0 -n1 node --check\n- node --input-type=module -e "await import('./js/main.js')"\n- wasm-pack build wasm --target web --out-dir pkg --release\n- git diff --check

…t-structure

# Conflicts:
#	js/main.js
#	wasm/src/interaction/mod.rs
#	wasm/src/parser/geometry.rs
#	wasm/src/parser/tests.rs
#	wasm/src/renderer/mod.rs
@dsafdsaf132 dsafdsaf132 merged commit 4b63f3b into main Jul 1, 2026
9 checks passed
@dsafdsaf132 dsafdsaf132 deleted the codex/refactor-project-structure branch July 1, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant