A modern browser extension built with best practices and modern tooling.
- Node.js 18+
- npm or yarn
- Chrome/Firefox browser
# Install dependencies
npm install
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Package extension
npm run package
├── src/ # Source code
│ ├── background/ # Background scripts
│ ├── content/ # Content scripts
│ ├── popup/ # Popup interface
│ └── utils/ # Shared utilities
├── assets/ # Static assets
│ ├── icons/ # Extension icons
│ ├── images/ # Other images
│ └── styles/ # CSS files
├── docs/ # Documentation
├── tests/ # Test files
├── tools/ # Build/deployment scripts
└── dist/ # Built extension (auto-generated)
npm run dev
- Development mode with file watchingnpm run build
- Production buildnpm run test
- Run testsnpm run lint
- Check code qualitynpm run format
- Format code with Prettiernpm run clean
- Clean build directorynpm run package
- Create distributable zip
- ESLint - Code linting and best practices
- Prettier - Automatic code formatting
- TypeScript - Type safety (optional)
- Jest - Unit testing framework
- Chrome Extension Testing - Browser-specific tests
- Multi-entry point configuration
- Asset optimization
- Source maps for debugging
- Hot reload support
- Chrome 88+
- Firefox 85+
- Edge 88+
- Development:
npm run dev
(watches for changes) - Production:
npm run build
(optimized build) - Package:
npm run package
(creates .zip file)
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Generate coverage report
npm test -- --coverage
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details