BloxwapChart SDK

Development and documentation

Run the library, edit these guides, and publish a static site with GitHub Pages.

Run the documentation locally

Use Node.js 24 or newer. From the repository root:

npm ci
npm run docs:dev

Open http://localhost:3902. The docs app builds the local chart package before starting, so the playground runs the same code as the library. Restart the docs command after editing library TypeScript or the playground to rebuild and copy the embedded demo assets.

Edit pages

MDX content lives in apps/docs/content/docs. Set title and description in the frontmatter, then write Markdown and code fences. Folder meta.json files control sidebar order.

The main app is in apps/docs/app; shared integration components are in apps/docs/components. This is a Fumadocs site using the static export configuration.

Validate

npm run docs:check
npm run docs:build
npm run docs:preview

The production build generates static HTML, assets, and a search index in apps/docs/out. Its postbuild check validates local links and assets. The preview command serves the exact exported files at http://localhost:3902.

The repository uses npm workspaces with one root lockfile. The library lives in packages/chart, the docs in apps/docs, and the standalone playground in apps/playground. Each workspace declares its own dependencies; the library and docs have separate TypeScript configurations. Building the docs does not add framework dependencies to the published chart package.

GitHub Pages

The repository includes .github/workflows/docs.yml. Pull requests build and validate the static site. Pushes to main and manual runs on main also deploy it to GitHub Pages.

In the repository's Settings → Pages, use GitHub Actions as the build source. The project URL is https://bloxwap.github.io/chart/.

To test that exact subpath locally:

NEXT_PUBLIC_BASE_PATH=/chart npm run docs:build
npm run docs:preview

The preview server reads the exported base path, so this build opens at http://localhost:3902/chart/. Pages paths, assets, and static search must all work under /chart, not just at the origin root.

Library commands

CommandPurpose
npm run buildGenerate icons, compile embedded WASM, and compile TypeScript
npm testBuild and run library tests
npm run coverageRun the coverage threshold check
npm run benchRun calculation and rendering benchmarks
npm run pack:chartBuild the library and create a tarball in packages/chart
npm run demoStart the standalone playground; requires Bun

Release to npm

Publishing a GitHub release publishes @bloxwap/chart from CI (.github/workflows/publish_npm.yml) through npm trusted publishing, so no npm token is stored in the repository.

  1. In a pull request, bump version in packages/chart/package.json (and the version export in packages/chart/src/index.ts), then merge it. A test fails if the two disagree.
  2. Create a GitHub release tagged v<version>, for example v0.0.2. The workflow fails if the tag and the package version disagree.
  3. The workflow builds, runs the full test suite, and publishes. Versions with -alpha, -beta, or -rc go to that npm dist-tag, other prereleases to prerelease, and everything else to latest.

See the repository for the source and MIT license.

Edit on GitHub

On this page