Development overview
This section is the canonical development documentation for rod2ik/TikZJax.
TikZJax uses Yarn 4.17.1, Webpack, MkDocs, a local incremental vendor workflow, and a sibling web2js project for the browser TeX runtime.
First setup
Enable Corepack once, then install the project dependencies:
corepack enable
yarn install
The project pins Yarn through package.json:
packageManager: yarn@4.17.1
and uses the classic node_modules linker through .yarnrc.yml for compatibility with the existing Webpack toolchain.
For reproducible installs after the lockfile exists, use:
yarn install --immutable
Daily development
There are two intentionally separate development environments.
Documentation site
yarn dev
This command:
- runs the incremental vendor synchronization;
- rebuilds TikZJax only if configured build inputs changed;
- synchronizes
dist/tosite/overrides/vendor/tikzjax/only when needed; - starts MkDocs with the local TikZJax vendor.
Documentation-only changes do not rebuild TikZJax.
For another device on the LAN:
yarn dev:lan
MkDocs is then exposed on 0.0.0.0:8000.
Webpack playground
yarn playground
Short alias:
yarn pg
For LAN access:
yarn playground:lan
# or
yarn pg:lan
The playground is useful for isolated runtime development. The MkDocs site is the preferred environment for validating real documentation integration.
Normal Web2js → TikZJax workflow
When Web2js changes:
cd ../web2js
yarn bfc
yarn deploy:tikzjax
cd ../tikzjax
yarn bfc
yarn dev
yarn deploy:tikzjax updates the TikZJax runtime handoff, including the four Web2js runtime artifacts and the generated TeX file manifest.
See Web2js integration for the complete data flow.
Development map
web2js/
│
│ yarn deploy:tikzjax
▼
tikzjax/
├── tex.wasm
├── tex.wasm.gz
├── core.dump
├── core.dump.gz
└── tex_files.json
│
│ yarn build / yarn bfc
▼
dist/
│
│ yarn vendor:sync
▼
site/overrides/vendor/tikzjax/
│
│ yarn dev
▼
MkDocs
Where to go next
- Yarn scripts — complete command reference.
- Vendor system — whitelist, hashes, incremental rebuilds, and adding vendors.
- Web2js integration — runtime artifacts and handoff workflow.
- Documentation site — MkDocs, local vendor mode, fenced blocks, and raw TikZ scripts.
- Build and validation — build layers and validation commands.
- Release workflow — version, tag, GitHub Release, npm publication, and CDN deployment.