UNPKG

curb-virtualized-chat

Version:

A virtualized chat component for React applications.

171 lines (114 loc) 2.27 kB
# Curb Virtualized Chat A virtualized chat component for React applications with real-time messaging capabilities. ## Installation Install the package using pnpm: ```bash pnpm add curb-virtualized-chat ``` Or using npm: ```bash npm install curb-virtualized-chat ``` Or using yarn: ```bash yarn add curb-virtualized-chat ``` ## Usage ```tsx import { VirtualizedChat } from 'curb-virtualized-chat'; function App() { return ( <VirtualizedChat messages={messages} onSendMessage={handleSendMessage} // ... other props /> ); } ``` ## Development ### Prerequisites - Node.js (>=16.0.0) - pnpm (>=7.0.0) ### Setup 1. Clone the repository 2. Install dependencies: ```bash pnpm install ``` ### Build To build the package: ```bash pnpm build ``` This will: - Compile TypeScript files (`pnpm compile`) - Bundle the package (`node bundle.mjs`) ### Development Mode To run in watch mode for development: ```bash pnpm dev ``` ### Testing Run tests: ```bash pnpm test ``` ### Linting Check for linting issues: ```bash pnpm lint ``` Fix linting issues: ```bash pnpm lint:fix ``` ### Formatting Format code: ```bash pnpm format ``` ## Deployment ### Publishing to npm 1. **Update version** in `package.json`: ```bash # For patch version (0.0.7 -> 0.0.8) pnpm version patch # For minor version (0.0.7 -> 0.1.0) pnpm version minor # For major version (0.0.7 -> 1.0.0) pnpm version major ``` 2. **Build the package**: ```bash pnpm build ``` 3. **Publish to npm**: ```bash pnpm publish ``` The `prepublishOnly` script will automatically run the build process before publishing. ### Pre-release versions For beta or alpha releases: ```bash # Create a beta version pnpm version prerelease --preid=beta # Publish beta version pnpm publish --tag beta ``` ### Dry run To test the publishing process without actually publishing: ```bash pnpm publish --dry-run ``` ## Package Information - **Current version**: 0.0.7 - **License**: MIT - **Author**: fdomovic - **Main file**: `dist/index.js` - **Type definitions**: `dist/index.d.ts` ## Peer Dependencies - React >=17.0.0 - React DOM >=17.0.0 ## Keywords react, chat, virtualized, component, messaging, real-time, ui