A powerful Chrome extension built with modern web technologies.
- Performance Optimized: Built with efficiency in mind for smooth user experience
- Customizable: Tailor the extension to your specific workflow needs
- Installation
- Getting Started
- Project Structure
- Configuration
- Development
- Build & Deployment
- Contributing
- License
- Node.js (v16.0.0 or higher)
- pnpm (v7.0.0 or higher)
- Chrome browser (v90.0 or higher)
- Clone the repository
git clone https://github.com/your-username/git-chrome-plugin.git
cd git-chrome-plugin
- Install dependencies
pnpm install
Start the development server:
pnpm dev
This will launch a development server at http://localhost:3000
and watch for file changes.
- Open Chrome and navigate to
chrome://extensions
- Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked" and select the
dist
directory - The extension should now appear in your Chrome toolbar
chrome-plugin-dev/
├── .gitignore # Git ignore file
├── .vscode/ # VS Code configuration
├── README.md # Project documentation
├── dist/ # Build output directory
├── package.json # Project dependencies and scripts
├── pnpm-lock.yaml # pnpm lock file
├── postcss.config.mjs # PostCSS configuration
├── public/ # Static assets
├── rsbuild.config.ts # Rsbuild configuration
├── src/ # Source code
│ ├── contentScripts/ # Content scripts (injected into web pages)
│ ├── popup/ # Popup UI
│ └── serviceWorker/ # Background service worker
├── tailwind.config.ts # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
The project uses Rsbuild for bundling. Key configurations in rsbuild.config.ts
:
- Entry Points: Configured for popup, contentScripts, and serviceWorker
- Output: Customized filenames without hashes for specific chunks
- Plugins: Includes React plugin for JSX support
- Target: Service worker is built for Node environment
Create a .env
file in the root directory to set environment variables:
API_URL=https://api.example.com
DEBUG=false
- ESLint and Prettier are used for code linting and formatting
- Follow the existing code style and conventions
- Write meaningful commit messages
pnpm test
Build the extension for production:
pnpm build
This will generate optimized files in the dist
directory.
Preview the production build locally:
pnpm preview
- Create a zip file of the
dist
directory - Follow the Chrome Web Store publishing guidelines
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please read CONTRIBUTING.md for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Rsbuild documentation - explore Rsbuild features and APIs
- Chrome Extension documentation - learn about Chrome extension development
- React documentation - learn React