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
42 changes: 33 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# Logs
logs
*.log
npm-debug.log*

# Coverage directory used by tools like istanbul
coverage

# dependencies
# Dependency directory
node_modules

# builds
package
# Optional npm cache directory
.npm

# OS stuff
._*
.DS_Store

# Some caches
.*cache

# Compiled dist
dist
package
build
storybook-static

# misc
.DS_Store
# Env files
.env
.env.*

npm-debug.log*
# IDE files
.idea
.vscode

# testing
coverage
# Temporary files
tmp

# Staff
.vite*
.codex
.claude
.agents
18 changes: 18 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# AGENTS.md

Working notes for agents (and humans) contributing to this repository.

## What matters here

`react-chartjs-2` is a thin React wrapper around [Chart.js](https://www.chartjs.org): a `<Chart>` component, typed components per chart type (`<Line>`, `<Bar>` and others) and a few event helpers. Chart.js does the drawing; this package only connects its lifecycle and data updates to React.

- **Stay thin.** Anything Chart.js already does belongs to Chart.js. New props and options are added only when they cannot be expressed through Chart.js `options`, `plugins` or a ref to the chart instance.
- **Bundle size matters.** The package is tree-shakeable and its size is a tested contract (`.size-limit.json`): a consumer pays only for the components they import. Follow the `tree-shaking` and `size-limit` skills.
- **Compatibility is part of the API.** The package supports every React version from the `peerDependencies` range and ships both ESM and CommonJS builds: CommonJS support was removed once and restored in v5.1 after users broke. Changing either is a breaking change.

## Repository layout

- `src` — the library sources; unit tests live next to them as `*.spec.tsx` (see the `unit-tests` skill).
- `stories` — Storybook stories, the place to check a component by eye.
- `sandboxes` — standalone example apps. The documentation website builds them into its example pages, and StackBlitz opens them straight from GitHub, so each sandbox keeps its own `package.json` with dependencies from npm.
- `website` — the documentation website, https://react-chartjs-2.js.org.
61 changes: 61 additions & 0 deletions skills-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"version": 2,
"skills": {
"browserstack-mcp": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/browserstack-mcp/SKILL.md",
"computedHash": "2aa8452bbb51e642c9abbd45ebdcce05dcc3bb056b17a90009ee7877b3b223f4"
},
"chrome-mcp": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/chrome-mcp/SKILL.md",
"computedHash": "d77f1a4ee5f431bcbc2954cf72fb2da053d8568b51917eb97b1594bb31fa2e6d"
},
"eslint-to-oxlint": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/eslint-to-oxlint/SKILL.md",
"computedHash": "cfdaaf34d30d0a241546c0d812ff462cd3c85b4ab07d23bff8a83619c47ff27d"
},
"item-by-item": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/item-by-item/SKILL.md",
"computedHash": "d77c18e1ff8942cea5b99f87545e41b3de618c84421feb9a0730af3338aeaf07"
},
"project": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/project/SKILL.md",
"computedHash": "8639ae8be1a2038b928a4a31cb03913e9ea4a3a16570286ce5e2cf2e7417f18a"
},
"size-limit": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/size-limit/SKILL.md",
"computedHash": "22becd50615fcf8a0bec36c78d1b11c461faae6e7537c4b785b8524df4e40863"
},
"tree-shaking": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/tree-shaking/SKILL.md",
"computedHash": "7d951c1098d6145c42158e1a00cb864c08eb882baff1ef7172c3b9fab0caee0f"
},
"unit-tests": {
"source": "TrigenSoftware/scripts",
"commit": "61e25d4029400b940a4067ae3fe032e9f2e4e38a",
"sourceType": "github",
"skillPath": "skills/unit-tests/SKILL.md",
"computedHash": "7e47e16f5e5976124f5c67295215121ab66ac5f4e9cea5711c9a6d629df32137"
}
}
}
Loading