vetengage-ui-library
v1.0.0
Published
VetEngage Design System is a comprehensive React component library designed to provide a consistent and efficient development experience for VetEngage web applications.
Readme
VetEngage Design System
VetEngage Design System is a comprehensive React component library designed to provide a consistent and efficient development experience for VetEngage web applications.
Tech Stack
- React: Core framework for building UI components
- Vite: Fast build tool for development and production
- TypeScript: Ensures type safety and maintainability
- Tailwind CSS: Utility-first styling for flexibility and efficiency
- Storybook: Component documentation and testing
- shadcn/ui: Pre-styled, accessible UI components
- Vitest: Unit testing for React components
- React Testing Library: Testing utilities
- React Hook Form: Form handling
- Zod: Schema validation
- Playwright (optional): Visual regression testing
- ESLint & Prettier: Code linting and formatting
- Husky: Enforce pre-commit hooks, linting, testing, and prevent bad commits
- Changesets: Versioning and package publishing
- Cursor: AI-powered coding assistant
Installation
To install the VetEngage Design System in your project, run:
pnpm add vetengage-ui-libraryUsage
- Import components:
import { Button } from 'vetengage-ui-library';- Import styles in your main entry file (e.g.,
main.tsorApp.tsx):
import 'vetengage-ui-library/style.css';- Use components in your template:
function App() {
return <Button variant="primary">Click me</Button>;
}
export default App;Development
To set up the project for development:
- Clone the repository:
git clone [email protected]:VetEngage/design-system.git
cd design-system- Install dependencies:
pnpm install- Start the development server:
pnpm dev- Run Storybook:
pnpm storybookBuilding & Versioning
Build the Library
To generate the production-ready package:
pnpm buildVersioning & Releasing
We use Changesets for semantic versioning and automated releases via GitHub Actions.
- Creating a Changeset
Run the following command to create a new changeset:
pnpm changesetSelect the appropriate version bump (patch, minor, or major) and describe the change.
- Merging & Automatic Release
- Select which packages you've modified
- Choose the semver bump type (major, minor, patch)
- Describe your changes
Once a changeset is merged into the main branch, GitHub Actions will automatically:
- Bump the package version
- Publish the new version to npm
- Push the updated package.json and changelog to the repository
For available versions, see the tags on this repository.
Testing
Run unit tests:
pnpm testRun visual regression tests (if configured):
pnpm test:visualLinting and Formatting
Lint the code:
pnpm lintFormat the code:
pnpm formatContributing
Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
