Thank you for your interest in contributing to the Transformers.js Chrome Extension! This document provides guidelines and instructions for contributing to the project.
- Node.js to build this project
- pnpm package manager to install dependencies
- Chrome browser to load and run the extension
- Clone the repository:
git clone git@github.com:tantara/transformers.js-chrome.git
cd transformers.js-chrome- Install dependencies:
pnpm install- Start the development server:
pnpm dev-
Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select the
build/chrome-mv3-devdirectory
- Open Chrome and navigate to
-
Build and package the extension for production:
pnpm build
pnpm packageIt will create a .zip file in the build/chrome-mv3-prod directory (ie build/chrome-mv3-prod.zip). Please ensure that the file is valid and can be installed in Chrome.
- Use TypeScript for all new code
- No need to follow existing code formatting patterns. I'm new to react and typescript. Feedback is always welcome.
- Use meaningful variable and function names
- Add comments for complex logic
- Create a new branch for your feature/fix:
git checkout -b feature/your-feature-name- Make your changes and test thoroughly
- Commit your changes with clear commit messages
- Push to your fork and submit a Pull Request
Before submitting a PR, please:
- Include screenshots or videos of the changes in the PR description if available
- Test the extension in Chrome
- Verify memory usage (using Chrome Task Manager)
- Check for any console errors
- Test with different models if your changes affect model loading/inference
- Use the service worker inspector in
chrome://extensions - Monitor memory usage through Chrome's Task Manager
- Check local storage for cached checkpoints in the browser's DevTools
- Update the README.md with details of significant changes
- Ensure your PR description clearly describes the problem and solution
- Reference any related issues in your PR description
- Use GitHub Issues to report bugs or request features
- Provide detailed steps to reproduce bugs
- Include Chrome version and system specifications
- For feature requests, explain the use case and benefits
- Be respectful and inclusive
- Provide constructive feedback
- Help maintain a positive community environment
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Ask in existing relevant issues
- Reach out to the maintainers
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.