Skip to content

oriverk/chrome-extension-preact-typescript-starter

 
 

Repository files navigation

Chrome Extension TypeScript Starter

build

Chrome Extension, TypeScript and Visual Studio Code

Prerequisites

Option

Includes the following

  • TypeScript
  • Webpack
  • React
  • Jest
  • Example Code
    • Chrome Storage
    • Options Version 2
    • content script
    • count up badge number
    • background

Project Structure

  • src/typescript: TypeScript source files
  • src/assets: static files
  • dist: Chrome Extension directory
  • dist/js: Generated JavaScript files

Setup

npm install

Import as Visual Studio Code project

...

Build

npm run build

Build in watch mode

terminal

npm run watch

Visual Studio Code

Run watch mode.

type Ctrl + Shift + B

Load extension to chrome

Load dist directory

Test

npx jest or npm run test

About

Chrome Extension Preact TypeScript Starter

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 57.5%
  • JavaScript 31.9%
  • HTML 9.7%
  • CSS 0.9%