react-typescript-web-extension-starter

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 端木安国
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

HitCount

React TypeScript Web Extension Starter

��️ A Web Extension starter kit built with React, TypeScript, SCSS, Storybook, EsLint, Prettier, Jest, Bootstrap,x & Webpack. Compatible with Google Chrome, Mozilla Firefox, and Brave.

Example Extension Popup

Getting Started

Run the following commands to install dependencies and start developing

yarn install
yarn dev

Scripts

  • yarn dev - run webpack in watch mode
  • yarn storybook - runs the Storybook server
  • yarn build - builds the production-ready unpacked extension
  • yarn test -u - runs Jest + updates test snapshots
  • yarn lint - runs EsLint
  • yarn prettify - runs Prettier
Loading the extension in Google Chrome

In Google Chrome, open up chrome://extensions in a new tab. Make sure the Developer Mode checkbox in the upper-right corner is turned on. Click Load unpacked and select the dist directory in this repository - your extension should now be loaded.

Installed Extension in Google Chrome

Loading the extension in Brave

In Brave, open up brave://extensions in a new tab. Make sure the Developer Mode checkbox in the upper-right corner is turned on. Click Load unpacked and select the dist directory in this repository - your extension should now be loaded.

Installed Extension in Brave

Loading the extension in Mozilla Firefox

In Mozilla Firefox, open up the about:debugging page in a new tab. Click the Load Temporary Add-on... button and select the manfiest.json from the dist directory in this repository - your extension should now be loaded.

Installed Extension in Mozilla Firefox

Notes

  • Includes ESLint configured to work with TypeScript and Prettier.

  • Includes tests with Jest - note that the babel.config.js and associated dependencies are only necessary for Jest to work with TypeScript.

  • Recommended to use Visual Studio Code with the Format on Save setting turned on.

  • Example icons courtesy of FontAwesome.

  • Microsoft Edge is not currently supported.

  • Includes Storybook configured to work with React + TypeScript. Note that it maintains its own webpack.config.js and tsconfig.json files. See example story in src/components/hello/__tests__/hello.stories.tsx

  • Includes a custom mock for the webextension-polyfill-ts package in src/__mocks__. This allows you to mock any browser APIs used by your extension so you can develop your components inside Storybook.

Example Storybook Setup

Built with

Misc. References

Notable forks

  • capaj - Chakra-ui instead of Bootstrap+SCSS, Storybook removed
  • 2018 react 大会 by Yangshun Tay 阳顺泰 React Conf 2018的经验教训 (Lessons Learned at React Conf 2018) I was fortunate to have attended React Conf 2018 thanks to my managers — it was an awesome event. I have bee

 相关资料
  • vue-web-extension ⚠️ This README is for the master version of the preset. If you use the v1 of this boilerplate with Vue-CLI 2 support, please see v1 branch. This Vue CLI preset allows you to quickly

  • react-typescript 项目概况 使用Ant-Design开发的一套后台管理系统,主要用到了React、Typescript、Mobx、PWA等技术,使用webpack5打包构建,包含React16的一些新特性。 项目主要技术结构 react typescript antd mobx webpack4 react-router4 pwa 安装 在终端下操作 项目地址: (git clon

  • React Webpack Typescript Starter Minimal starter with hot module replacement (HMR) for rapid development. React (17.x) Webpack (5.x) Typescript (4.x) Hot Module Replacement (HMR) (React Hot Loader) Pr

  • express-react-typescript A boilerplate to build web application using Express and React with help of Typescript. It's configured to separate client-side JavaScript and CSS bundles and your files as as

  • Webpack 5 boilerplate Webpack 5 boilerplate with support of most common loaders and modules: babel typescript (using ForkTsCheckerWebpack ) sass, less, css modules with automatic typescript declaratio

  • 淘宝前端团队开源项目React Web,通过与React Native一致的API构建Web应用。 配置: // webpack.config.jsvar HasteResolverPlugin = require('haste-resolver-webpack-plugin');module.exports = {  resolve: {    alias: {      'react-nati