Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
webpack.config.js
src/
test-harness/
.husky/
.github/
vite.config.ts
tsconfig.json
.eslintrc.js
.gitignore
eslint.config.mjs
commitlint.config.mjs
.prettierrc*
.prettierignore
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable changes to this project will be documented in this file.

## [2.0.0] - 2026-03-26

Initial public release.

### Added

- `Backgammon` component — the main board component accepting a `BoardState` prop
- `direction` prop (`"clockwise"` | `"anticlockwise"`) to control which way the player moves (#8)
- Bar component to display hit checkers (#6)
- Dice display via `dice` prop — supports one or two dice values (#1)
- Doubling cube display via `doublingCube` prop with owner and value (#1)
- Pip counter in the sidebar (#1)
- `preset` prop with 7 built-in themes: `default`, `felt`, `coral`, `forest`, `rose`, `arctic`, `sand` (#10)
- `theme` prop for fully custom theming via a `Theme` object
- `positions` prop to render checker positions on the board
- SVG-based rendering for crisp display at any size
- Full TypeScript types exported (`BoardState`, `Theme`, `Position`, `DoublingCube`, `DieValue`, `Direction`, `PlayerType`)
- ESM and UMD builds with type declarations
- Peer dependency support for React 17, 18, and 19
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Laszlo Heves

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

A React component library for rendering a backgammon board. Displays positions, dice, and the doubling cube as a scalable SVG. Fully typed with TypeScript.

![](./backgammon-board-react.png)

Use the online editor:<br/>https://backgammonist.github.io/backgammon-board-react/

## Installation

```bash
Expand Down
Binary file added backgammon-board-react.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backgammon-board-react",
"version": "1.0.0",
"version": "2.0.0",
"description": "Simplistic backgammon board in react",
"type": "module",
"files": [
Expand All @@ -20,7 +20,8 @@
"build": "vite build",
"lint": "eslint .",
"format": "prettier --write --ignore-unknown .",
"prepare": "husky",
"prepare": "husky || true",
"prepublishOnly": "npm run build",
"commitlint": "commitlint --edit $1"
},
"repository": {
Expand Down
Loading