Thanks for your interest in contributing!
git clone <your-fork>
cd jsOFD
npm installToolchain: Node ≥ 18, TypeScript (strict), Vitest, tsup, ESLint + Prettier.
npm run dev # launch the interactive playground (Vite)
npm test # run the full test suite
npm run typecheck # tsc --noEmit
npm run lint # ESLint
npm run lint:fix # ESLint --fix
npm run format # Prettier
npm run build # build dist/ (ESM + CJS + UMD + types)- Create a feature branch (
git checkout -b feat/my-feature). - Make your change with tests — aim to keep coverage of public APIs.
- Ensure
pnpm lint,pnpm typecheckandpnpm testall pass. - Add a note to
CHANGELOG.mdunder Unreleased. - Open the PR with a clear description and motivation.
- TypeScript strict mode; no
anyinsrc/(tests may relax). - English JSDoc for public APIs; keep comments about why, not what.
- Units: the internal model stores points (pt); serialisation converts to mm.
- OFD output must stay compliant with GB/T 33190-2016. When in doubt, cross-validate with an independent reader such as ofdrw.
Please include a minimal reproduction (code sample or PDF input) and the
generated .ofd when relevant.