Skip to content

feat: publish marknest-wasm to npm via release workflow#19

Merged
developer0hye merged 1 commit into
mainfrom
feat/wasm-npm-publish
Mar 10, 2026
Merged

feat: publish marknest-wasm to npm via release workflow#19
developer0hye merged 1 commit into
mainfrom
feat/wasm-npm-publish

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • Add WASM build and npm publish to the existing release workflow
  • Bundle runtime assets (mermaid, mathjax) within the wasm crate for self-contained builds
  • Publish marknest-wasm npm package on every tagged release

Key changes

  • crates/marknest-wasm/runtime-assets/: Bundled mermaid.min.js and tex-svg.js
  • crates/marknest-wasm/src/lib.rs: Fix include_bytes! paths to use crate-local assets
  • .github/workflows/release.yml: New build-wasm and publish-wasm-npm jobs

Usage after publish

import init, { analyze_zip, render_zip_preview } from 'marknest-wasm';

await init();
const index = analyze_zip(zipBytes);

Test plan

  • cargo check -p marknest-wasm --target wasm32-unknown-unknown passes
  • All 12 WASM tests pass
  • Verify wasm-pack build in CI after merge

🤖 Generated with Claude Code

- Bundle runtime assets within marknest-wasm crate (same fix as CLI)
- Add build-wasm job using wasm-pack for browser-target WASM
- Add publish-wasm-npm job to publish marknest-wasm to npm
- Include WASM tarball in GitHub Release assets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye developer0hye merged commit 0a1ba24 into main Mar 10, 2026
2 checks passed
@developer0hye developer0hye deleted the feat/wasm-npm-publish branch March 10, 2026 15:46
@developer0hye developer0hye mentioned this pull request Mar 11, 2026
2 tasks
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