chrome-plugin-dev

Git Chrome Plugin

A powerful Chrome extension built with modern web technologies to enhance your Git workflow and productivity.

πŸš€ Features

πŸ“‹ Table of Contents

πŸ› οΈ Installation

Prerequisites

Steps

  1. Clone the repository
git clone https://github.com/your-username/git-chrome-plugin.git
cd git-chrome-plugin
  1. Install dependencies
pnpm install

🚦 Getting Started

Development Mode

Start the development server:

pnpm dev

This will launch a development server at http://localhost:3000 and watch for file changes.

Load the Extension in Chrome

  1. Open Chrome and navigate to chrome://extensions
  2. Enable β€œDeveloper mode” (toggle in the top-right corner)
  3. Click β€œLoad unpacked” and select the dist directory
  4. The extension should now appear in your Chrome toolbar

πŸ“ Project Structure

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

βš™οΈ Configuration

Rsbuild Configuration

The project uses Rsbuild for bundling. Key configurations in rsbuild.config.ts:

Environment Variables

Create a .env file in the root directory to set environment variables:

API_URL=https://api.example.com
DEBUG=false

πŸ‘¨β€πŸ’» Development

Code Style

Testing

pnpm test

πŸ—οΈ Build & Deployment

Production Build

Build the extension for production:

pnpm build

This will generate optimized files in the dist directory.

Preview Production Build

Preview the production build locally:

pnpm preview

Packaging for Chrome Web Store

  1. Create a zip file of the dist directory
  2. Follow the Chrome Web Store publishing guidelines

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Please read CONTRIBUTING.md for more details.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”— Learn More