Browser Extension Starter
Browser Extension Starter
Browser extension starter kit with Typescript, E2E tests, icon generation, automatic i18n, Github pages automation and ESBuild

Downloads
Chrome Web Store |
Firefox Add-ons |
Opera Add-ons |
Ms Edge Add-ons |
Safari Extensions |
Project setup
# Install dependencies
npm install
# Build extension for development, watch for file changes and rebuild.
npm run build
npm run watch
# Generate compliant images assets for logo (default logo location assets/logo.png)
npm run generateIcons
# Translate app strings to all supported chrome locales
npm run translate
# Start an instance of Chromium with extension installed (using puppeteer)
# For Firefox, pass --browser=firefox as argument.
npm run build start
# Build and package extension into a store-ready upload
node tools/esbuild.js build --prod
# Create extension package for Firefox/Opera/Edge by specifying --browser argument
node tools/esbuild.js build --prod --browser=firefox
# Run tests
npm run test
# Update static Github pages config and assets
node website/config_generator.js
Install Locally
Chrome
- Open chrome and navigate to extensions page using this URL: chrome://extensions.
- Enable the “Developer mode”.
- Click “Load unpacked extension” button, browse the
build/chrome-devdirectory and select it.
Firefox
- Open firefox and navigate to
about:debugging#/runtime/this-firefox. - Click the “Load Temporary Add-on” button.
- Browse the
build/firefox-devdirectory and select themanifest.jsonfile.
Features
- Automatic Github Pages generation: Files added in the
gh-pagessub-directory are branched to create a Github page automatically. This is useful for static pages like help, welcome and feedback pages. - Typescript to Js: Write your entire chrome extension in Typescript and have it transpiled to JavaScript.
- E2E extension test: Start up a chrome browser with your extension installed, write your tests in Jasmine.
- Generate extension icons: Forget the pain of generating icons of different size to meet icons requirements.
- Manifest V3 Compatible: Easier submission to the Chrome Webstore.
- Automatic translation: The messages for all supported i18n locales are auto-generated from the English version.
- Zero Dependencies: This starter is minimal to avoid supply-chain attacks which is rampant with Js projects.
- Welcome and Uninstall pages: To give your project a head start, welcome pages are great for demos and uninstall pages provide a thoughtful exit.
- Utilities for common tasks: Comes with helpers logging, storage, and requesting feedback.