Thank you for your interest in contributing to Typelit! This document will guide you through setting up your development environment and explain our development process.
- Node.js (LTS version recommended)
- npm or yarn
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/typelit.git
cd typelit- Install dependencies:
npm installThe project uses Rollup to build multiple output formats:
- CommonJS (for Node.js)
- ES Modules (for modern bundlers)
- UMD (for browsers)
Available build commands:
npm run build # Build once
npm run dev # Build in watch mode for developmentBuilt files will be available in the dist directory with the following
structure:
dist/
├── cjs/ # CommonJS format
├── esm/ # ES Modules format
├── umd/ # UMD format
└── index.d.ts # TypeScript declarations
We use Vitest for testing. Write tests in files with the .test.ts extension.
Available test commands:
npm test # Run tests once
npm test watch # Run tests in watch modeWe use ESLint with TypeScript support and Prettier for code formatting:
npm run lint # Run linting checksConfigure your IDE to use the project's ESLint and Prettier configurations for the best development experience.
- Keep the
README.mdup to date if you're changing user-facing functionality - Document new features with examples
- Update JSDoc comments for any modified public APIs
If you have any questions about contributing, feel free to open an issue in the GitHub repository.