Skip to content

Improve build system output and simplify Vite config#244

Open
aram356 wants to merge 2 commits intomainfrom
feature/build-system-improvements
Open

Improve build system output and simplify Vite config#244
aram356 wants to merge 2 commits intomainfrom
feature/build-system-improvements

Conversation

@aram356
Copy link
Collaborator

@aram356 aram356 commented Feb 5, 2026

Summary

  • Adds build-print crate for better build output formatting using info!, warn!, and error! macros
  • Uses standard npm run build instead of build:custom script
  • Removes build timestamp banner from Vite output
  • Improves TypeScript const typing in Vite config

Before

cargo:warning=tsjs: npm not found; will use existing dist if available
cargo:warning=tsjs: Building unified bundle

After

   info: tsjs: Building unified bundle
   warn: tsjs: npm not found; will use existing dist if available
  error: tsjs: npm install failed; using existing dist if available

Test plan

  • Verify cargo build shows improved output format
  • Verify npm run build in crates/js/lib still works
  • Verify Vite build completes without timestamp banner

Dependencies

None - this PR is independent and can be merged at any time.

Closes #252
Related to #179

- Add build-print crate for better build output formatting (info/warn/error macros)
- Use standard `npm run build` instead of `build:custom` script
- Remove build timestamp banner from Vite output
- Improve TypeScript const typing in Vite config

The build-print macros provide cleaner, more readable build output compared
to raw cargo:warning println! statements.
@aram356 aram356 added enhancement New feature or request and removed enhancement New feature or request labels Feb 5, 2026
@aram356 aram356 self-assigned this Feb 5, 2026
@aram356 aram356 marked this pull request as draft February 5, 2026 19:50
@aram356 aram356 marked this pull request as ready for review February 5, 2026 22:18
@aram356 aram356 force-pushed the feature/build-system-improvements branch 3 times, most recently from b0f4447 to 97e991c Compare February 5, 2026 22:24
- Remove unused `build:custom` npm script from package.json
- Downgrade npm install failure from error! to warn! (execution continues)
- Remove unused `error` import from build_print
- Replace `npm.clone()` with `npm.as_deref()` to avoid unnecessary allocations
- Include Cargo.lock for build-print dependency
@aram356 aram356 force-pushed the feature/build-system-improvements branch from 97e991c to f1768cc Compare February 5, 2026 22:28
@aram356 aram356 requested review from ChristianPavilonis, jevansnyc and prk-Jr and removed request for jevansnyc February 5, 2026 22:30
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.

Improve build system output and simplify Vite config

1 participant