All Projects → kryptokinght → React Extension Boilerplate

kryptokinght / React Extension Boilerplate

Licence: mit
🚀 Modern React boilerplate for Firefox and Chrome extensions.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Extension Boilerplate

Web Extension Starter
Typescript, React, Redux, Styled-Component and Webpack based sample extension boilerplate. Runs on Chrome and Firefox. Sample chrome extension.
Stars: ✭ 115 (-35.03%)
Mutual labels:  boilerplate, chrome-extension, firefox-extension
Brotab
Control your browser's tabs from the command line
Stars: ✭ 137 (-22.6%)
Mutual labels:  chrome-extension, firefox-extension
Vue Chrome Extension Boilerplate
Boilerplate for Chrome extension using Vue.js and Webpack with auto-reload enabled.
Stars: ✭ 171 (-3.39%)
Mutual labels:  boilerplate, chrome-extension
Disable Javascript
Adds the ability to disable JavaScript on specific sites.
Stars: ✭ 151 (-14.69%)
Mutual labels:  chrome-extension, firefox-extension
Html5 Video Everywhere
Higher performance and stable video watching experience on the web
Stars: ✭ 118 (-33.33%)
Mutual labels:  chrome-extension, firefox-extension
Serverless To Cgi Bin
A browser extension that replaces occurrences of 'serverless' with 'cgi-bin'
Stars: ✭ 119 (-32.77%)
Mutual labels:  chrome-extension, firefox-extension
Awesome Chrome Extension Boilerplate
Use react + typescript + webpack to enhance your chrome extension development experience
Stars: ✭ 146 (-17.51%)
Mutual labels:  boilerplate, chrome-extension
Markdown Clipper
A Firefox and Google Chrome extension to clip websites and download them into a readable markdown file.
Stars: ✭ 100 (-43.5%)
Mutual labels:  chrome-extension, firefox-extension
Absolutedoubletrace
A web extension to block browser fingerprinting
Stars: ✭ 156 (-11.86%)
Mutual labels:  chrome-extension, firefox-extension
Spotify Lyrics
🎉 Desktop Spotify Web Player Instant Synchronised Lyrics
Stars: ✭ 162 (-8.47%)
Mutual labels:  chrome-extension, firefox-extension
Sponsorblock
Skip YouTube video sponsors (browser extension)
Stars: ✭ 3,627 (+1949.15%)
Mutual labels:  chrome-extension, firefox-extension
Github Mermaid Extension
A browser extension for Chrome, Opera & Firefox that adds Mermaid language support to Github
Stars: ✭ 170 (-3.95%)
Mutual labels:  chrome-extension, firefox-extension
Simplified Twitter
Remove distractions from the new Twitter layout. Extension for Chrome, Firefox, Safari, Edge & More
Stars: ✭ 111 (-37.29%)
Mutual labels:  chrome-extension, firefox-extension
Kiwix Js
Full portable & lightweight ZIM reader in Javascript
Stars: ✭ 130 (-26.55%)
Mutual labels:  chrome-extension, firefox-extension
Ui Tool
UI for create-web-ext
Stars: ✭ 104 (-41.24%)
Mutual labels:  boilerplate, chrome-extension
Slader Extension
Bypass Slader's 5 solutions limit per month to college books and remove the paywall about how many solutions left
Stars: ✭ 131 (-25.99%)
Mutual labels:  chrome-extension, firefox-extension
Chrome Extension Webpack Boilerplate
A basic foundation boilerplate for rich Chrome Extensions using Webpack to help you write modular and modern Javascript code, load CSS easily and automatic reload the browser on code changes.
Stars: ✭ 1,320 (+645.76%)
Mutual labels:  boilerplate, chrome-extension
Save In
WebExtension for saving media, links, or selections into user-defined directories
Stars: ✭ 99 (-44.07%)
Mutual labels:  chrome-extension, firefox-extension
Browser Extension Json Discovery
Browser (Chrome, Firefox) extension for JSON discovery
Stars: ✭ 157 (-11.3%)
Mutual labels:  chrome-extension, firefox-extension
Tako
Tako replaces the default Github repository file list with an expandable file tree and file preview for rapid exploration of repositories.
Stars: ✭ 172 (-2.82%)
Mutual labels:  chrome-extension, firefox-extension

React Extension Boilerplate for Chrome and Firefox

Fork Issues Stars Watchers MIT license PRs Welcome

Still in Development!

⚡️ Are you trying to create a web Extension but still looking for a starting point?
⚡️ Do you want your extension to run in both Firefox and Chrome?
⚡️ Are you tired of repeteadly reloading your extension after every small change you make?
⚡️ Do you want to develop your exetension using modern technologies like React, Webpack, Jest?


We have a solution!

React Extension Boilerplate is a modern web extension template for building Mozilla and Chrome extensions using ReactJS.

Allows smooth and fast development of extension using on-the-go loading, building, packaging and publishing on the most common browsers Chrome and Firefox.
Make changes to the source code and watch the extension implement these changes live in the browser.
Implements all the best Javascript practises with ESLint, Jest, React-StoryBook, Webpack and lots more.

Installation 🏁

Installing this boilerplate is as simple as cloning this repo in a new folder and start editing the source folder.

Before you begin installing this project you need NodeJS and npm installed on your machine. Make sure to install the latest version of node.

# clone the git repo
$ git clone https://github.com/kryptokinght/react-extension-boilerplate.git

# Install dependencies
$ npm install

Development 💻

  • Run script
# build files to './dev' 
# and launches the web ext in a new chrome instance, watches for changes and updates
$ npm run start:chrome
# launches in firefox
$ npm run start:firefox
# runs storybook
$ npm run storybook

npm run chrome-launch in action: dev gif

  • If you want to load your unpacked extension by yourself, then run npm run dev. This will create the extension inside an dev folder in development mode and will watch the src folder for changes.
  • Load unpacked extensions with ./dev folder. Though you have to reload the extension by yourself every time the ./dev folder updates.

Screenshot of the development folder:
dev folder screenshot

Go to the project folder and run the following commands:

How to develop extension using the boilerplate

The CODETOUR.md gives an overview of the project structure.
The only folder important to you is the source folder. The /src contains the different components of the extension like content_scripts, background, options, popup, sidebar.

Any component which you not require, suppose you don't need sidebar, you can simply delete that component from the src folder and it will not be included inside your build.

If you don't want to use React..

Suppose you don't want to use React in your popup to develop UI. You can delete all the files inside the popup folder only leaving the [template.html] inside it.
You can use this template.html as your popup.html. BUT any scripts or CSS files referenced inside this template.html should be put inside the src/lib folder.

Example of an extension bootstrapped using React Extension Boilerplate that doesn't use React!

Storing static assets like images, fonts

Separate folders have been provided to store these static assets.

  • /src/img
  • /src/fonts

These assets are copied as it is to the build folder, just like the /src/lib folder.

Delete unnecessary files from the boilerplate

Files like CODETOUR.md, CONTRIBTUING.md, README.md, LICENSE in case they are not relavant to your project. Once the CLI tool is build, it will help you scaffold the extension without including these unnecessary files.

If you need any further help regarding feel free to ask on our Gitter community or create an issue.

Build 🔧 🔨

# build files to './extension'
$ npm run build

Once created here's what the extension folder looks like:
Extension folder

Compress 🔩

# compress build folder to {manifest.name}.zip and crx
$ npm run build
$ npm run compress -- [options]

Options

If you want to build crx file (auto update), please provide options, and add update.xml file url in [manifest.json](https://developer.chrome.com/extensions/autoupdate#update_url manifest.json).

  • --app-id: your extension id (can be get it when you first release extension)
  • --key: your private key path (default: './key.pem')
    you can use npm run compress-keygen to generate private key ./key.pem
  • --codebase: your crx file url

See autoupdate guide for more information.

Features

Contributing 🎉

To get an idea about the structure of the project, read here. Contributions are highly welcome. Please take some time to read the guidelines mentioned here contribute.

License

The code is available under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].