MCPcopy Index your code
hub / github.com/EmailThis/extension-boilerplate

github.com/EmailThis/extension-boilerplate @v1.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.0 ↗
9 symbols 25 edges 8 files 0 documented · 0%
README

Extension Boilerplate

<strong>A foundation for creating browser extensions for Chrome, Opera & Firefox.</strong>

Now that Firefox supports WebExtensions, it has become a lot easier to build browser extensions/addons for multiple browsers without duplicating the codebase. This project serves as a sensible starting point to help you get started.

Extention Boilerplate

I have extracted this from the browser extensions that I built for my side-project, Email This.

Side note: Do check out Email This. It is a simpler alternative to bookmarking tools like Pocket, Readability & Instapaper. Email This will remove ads & distractions from an article and send you a nice email with just the text/images. You can then open up the email client on your laptop/mobile and read the article whenever you want. No need to install any additional applications or login to another app just to access your bookmarks.

Features

Write once and deploy to Chrome, Opera & Firefox
Based on WebExtensions. It also includes a tiny polyfill to bring uniformity to the APIs exposed by different browsers.
Live-reload
Your changes to CSS, HTML & JS files will be relayed instantly without having to manually reload the extension. This ends up saving a lot of time and improving the developer experience.
Sensible starting point
This comes with a gulp based workflow that converts modern ES6 JavaScript and SCSS to JS/CSS.
Sketch (.sketch) assets for icons and promo images
A .sketch file is included in the resources directory. This has all the icons and promo images that will be needed while uploading the extensions to the app stores.

Installation

  1. Clone the repository git clone https://github.com/EmailThis/extension-boilerplate.git
  2. Run npm install
  3. Run npm run build
Load the extension in Chrome & Opera
  1. Open Chrome/Opera browser and navigate to chrome://extensions
  2. Select "Developer Mode" and then click "Load unpacked extension..."
  3. From the file browser, choose to extension-boilerplate/build/chrome or (extension-boilerplate/build/opera)
Load the extension in Firefox
  1. Open Firefox browser and navigate to about://debugging
  2. Click "Load Temporary Add-on" and from the file browser, choose extension-boilerplate/build/firefox

Developing

The following tasks can be used when you want to start developing the extension and want to enable live reload -

  • npm rum chrome-watch
  • npm run opera-watch
  • npm run firefox-watch

Packaging

Run npm run dist to create a zipped, production-ready extension for each browser. You can then upload that to the appstore.

TODO

  • [ ] Add support for Safari
  • [ ] Add Firefox & Opera Promo images
  • [ ] Add sample screenshot templates
  • [ ] Write a guide for using config variables & JS preprocessor

This project is licensed under the MIT license.

If you have any questions or comments, please create a new issue. I'd be happy to hear your thoughts.

Bharani, Email This

Core symbols most depended-on inside this repo

pipe
called by 6
gulpfile.babel.js
renderMessage
called by 3
src/scripts/popup.js
mergeAll
called by 1
gulpfile.babel.js
buildJS
called by 1
gulpfile.babel.js
extractTags
called by 1
src/scripts/contentscript.js
template
called by 1
src/scripts/popup.js
onRequest
called by 0
src/scripts/contentscript.js
renderBookmark
called by 0
src/scripts/popup.js

Shape

Function 9

Languages

TypeScript100%

Modules by API surface

src/scripts/popup.js3 symbols
gulpfile.babel.js3 symbols
src/scripts/contentscript.js2 symbols
src/scripts/utils/ext.js1 symbols

Dependencies from manifests, versioned

babel-core6.1.2 · 1×
babel-preset-es20156.1.2 · 1×
babelify7.3.0 · 1×
browserify14.1.0 · 1×
event-stream3.3.4 · 1×
gulp3.9.0 · 1×
gulp-babel6.1.0 · 1×
gulp-clean0.3.1 · 1×
gulp-eslint2.0.0 · 1×
gulp-if2.0.2 · 1×
gulp-livereload3.8.1 · 1×
gulp-load-plugins0.5.3 · 1×

For agents

$ claude mcp add extension-boilerplate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact