Monorepo containing components and utilities for react-tea-cup.
This monorepo manages the following sub-packages:
- package/tea-cup-prelude: Core prelude, types, and Elm Architecture runtime utilities.
- package/tea-cup-form: Reusable, type-safe form validation and state management components.
- package/tea-cup-pagination: Standard React pagination component following Elm Architecture principles.
- package/tea-cup-link-pagination: Bidirectional infinite-scroll and cursor-based stream pagination engine.
- package/tea-cup-intersection-observer: Intersection Observer subscription for React Tea-Cup applications.
- package/tea-cup-router: Pure, modular router and navigation manager preventing double-update loops.
- package/tea-cup-rte-toolkit: Rich Text Editor toolkit built for React Tea-Cup applications.
Ensure you have Node.js and pnpm installed:
# Verify pnpm version
pnpm --versionInstall the dependencies across the entire workspace and link local packages:
pnpm installCompile all the packages in the workspace in the correct topological order:
pnpm buildAll scripts are executed from the monorepo root using pnpm workspace filters:
| Command | Description |
|---|---|
pnpm build |
Compile all packages in the workspace |
pnpm check |
Run TypeScript type checking on all packages |
pnpm lint |
Run ESLint check across the entire workspace |
pnpm format |
Automatically format all codebase files with Prettier |
To use these packages in a host application during development, clone this repository as a sibling to your project and reference them using pnpm links in your package.json:
parent-directory/
├── your-host-application/
└── tea-cup-package/ <-- This repository
Before using them in your host application, build the packages:
cd tea-cup-package
pnpm install
pnpm buildIn your host application's package.json, add the dependencies using relative paths:
"dependencies": {
"@rinn7e/tea-cup-prelude": "link:../tea-cup-package/package/tea-cup-prelude",
"@rinn7e/tea-cup-form": "link:../tea-cup-package/package/tea-cup-form",
"@rinn7e/tea-cup-pagination": "link:../tea-cup-package/package/tea-cup-pagination",
"@rinn7e/tea-cup-link-pagination": "link:../tea-cup-package/package/tea-cup-link-pagination",
"@rinn7e/tea-cup-intersection-observer": "link:../tea-cup-package/package/tea-cup-intersection-observer",
"@rinn7e/tea-cup-router": "link:../tea-cup-package/package/tea-cup-router",
"@rinn7e/tea-cup-rte-toolkit": "link:../tea-cup-package/package/tea-cup-rte-toolkit"
}Since the compiled assets (lib/ folders) are tracked in this repository, your host application will pick up the changes immediately after you run pnpm build in the tea-cup-package workspace.