@compilorama/compy
v0.3.0
Published
React UI component library
Readme
Compy
Compy is a React UI component library. It ships ready-to-use components, shared design tokens, and fonts so you can drop a consistent look into your app without reinventing the basics.
For AI agents
If you are an AI agent integrating this library into a project, read
node_modules/<lib>/dist/docs/CONSUMERS.md before writing code that uses its components.
Installation
Install the package from npm:
npm install @compilorama/compyCompy expects react v18 or later and react-dom as peer dependencies, so make sure those are already in your project.
Usage
Refer to src/docs/components.md to learn how to use each component.
Contribute
To work on this repo you need Node.js and npm. That is enough to install dependencies and run every script below. After you clone the project, run npm install at the root.
npm run format lints src and playground/src with ESLint so style and basic correctness stay consistent.
npm run build compiles the library into dual CJS and ESM bundles under dist, copies CSS and fonts, and emits TypeScript declarations. Use npm run build:watch when you want the same build to re-run as you edit sources.
npm test runs the Jest suite with coverage. The project enforces 100% coverage on branches, functions, lines, and statements, so a failing threshold means you still have work to do.
npm run test:treeshake builds a tiny consumer bundle against dist and checks that tree-shaking and the public style/export surface behave as expected. Run it after a successful npm run build.
npm start boots the local playground (see the next section). prepublishOnly runs the build automatically before a publish so dist stays fresh; you normally do not need to invoke it yourself.
Playground
The playground is a small app under playground/ where you can see and exercise library components in the browser while you develop. It imports the library sources directly, so you get a fast feedback loop without publishing a package first.
From the repo root, run npm start. That starts Vite with the playground config and opens the local demo environment. Use it to try variants, layouts, and interactions before you commit a change.
Notes
Before you open a commit, lint and test your changes. Run npm run format and npm test, and keep the suite at 100% coverage. If either step fails, fix it first — that bar is part of how this library stays trustworthy as it grows.
