A React package for managing keyboard shortcuts and sequences, with TypeScript support and Next.js compatibility.
npm install keyboard-manager-pro
- 🎯 Zero dependencies (except React)
- 📦 Fully typed with TypeScript
- 🔄 Compatible with Next.js
- ✅ Comprehensive test suite
import { useKeyboard } from 'keyboard-manager-pro';
function App() {
// TODO: Add an example
}
This project uses:
- TypeScript for type safety
- Vitest for testing
- ESLint for linting
- Prettier for code formatting
- Changesets for version management
- Husky for git hooks
- Conventional Commits for commit messages
- Clone the repository:
git clone https://github.com/yourusername/keyboard-manager-pro.git
cd keyboard-manager-pro
- Install dependencies:
npm install
- Start development:
npm run dev
npm run build
- Build the packagenpm run dev
- Watch mode with tsupnpm test
- Run testsnpm run test:watch
- Run tests in watch modenpm run lint
- Run ESLintnpm run format
- Format code with Prettier
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
-
Make your changes following our coding standards:
- Write tests for new features
- Follow the conventional commits specification
- Run tests and linting before committing
-
Create a changeset to document your changes:
npx changeset
- Commit your changes:
git commit -m "feat: add amazing feature"
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project follows Conventional Commits. Examples:
feat: add new keyboard hook
fix: resolve event listener memory leak
docs: update API documentation
chore: update dependencies
refactor: improve hook performance
test: add more test cases
- Changes are documented using Changesets
- GitHub Actions automatically creates release PRs
- Merging to main triggers automatic publishing
- Versions follow semantic versioning
# Run all tests
npm test
# Watch mode
npm run test:watch
MIT © [Nilesh]
Made with ❤️ by [Nilesh]
```
This README:
- Describes the package and its features
- Provides installation and usage instructions
- Details the development setup and workflow
- Explains the contribution process
- Documents the commit convention
- Describes the release process
- Includes testing and documentation information