@o-zone/scorer-core
v2.1.2
Published
Orienteering scoring core library with modular exports
Downloads
756
Readme
@o-zone/scorer-core
Orienteering scoring core library with modular exports for server, race, and competition management.
Installation
pnpm add @o-zone/scorer-coreUsage
Server Module
import { Scorer } from '@o-zone/scorer-core/server';Race Module
import { ... } from '@o-zone/scorer-core/race';Competition Module
import { ... } from '@o-zone/scorer-core/competition';Development
Setup
pnpm installBuild
pnpm run build # Compile TypeScript → dist/
pnpm run build:watch # Watch mode for developmentQuality Checks
pnpm run check:types # TypeScript type checking
pnpm run lint # Code quality with Biome
pnpm run lint:fix # Auto-fix lint issues
pnpm run format # Code formattingPublishing
This package uses Changesets for automated version management and npm publishing.
Workflow
- Make code changes
- Run
pnpm changeset addto document changes - Push to main branch
- GitHub Actions automatically:
- Creates a Release PR (bumps version, updates changelog)
- Publishes to npm when PR is merged
Documentation
- Quick Reference - One-page reference
Package Structure
src/
├── server.ts # Server module
├── race/index.ts # Race module
└── competition/ # Competition module
dist/ # Built output (published to npm)Scripts
| Command | Purpose |
|---------|---------|
| pnpm run build | Build TypeScript to dist/ |
| pnpm run build:watch | Watch mode build |
| pnpm run check:types | Type check without emit |
| pnpm run lint | Lint code |
| pnpm run lint:fix | Auto-fix lint issues |
| pnpm run format | Format code |
| pnpm changeset add | Create a changeset |
| pnpm run publish | Build and publish |
Technologies
- Language: TypeScript 5.3+
- Runtime: pnpm 1.3.5+
- Package Manager: pnpm
- Linter: Biome
- Release Management: Changesets
- CI/CD: GitHub Actions
- Module Format: ES Modules (ESM)
License
MIT
Contributing
- Create a feature branch
- Make your changes
- Run
pnpm run lint:fixto format - Create a changeset:
pnpm changes - Push and create a pull request
