Bext Boilerplate#
A Preact-Rendered Chrome/Firefox extension built with Bext.
Uses:
background.tslogs url to extension console for each new tab updatecontent_script.tsshows a really annoying dialog on every page loadoptions.tsxdisplays an updatable browser-storage string, and a routerpopup.tsxrenders a button via Preact that deeplinks to options page
You need to download Deno and bext in order to build this app.
Usage#
| Commands | What they Do |
|---|---|
deno task dev |
build and watch for changes |
deno task build |
bundles extension |
deno task build:chrome |
bundles extension only for chrome |
deno task build:firefox |
bundles extension only for firefox |
deno task test |
run fmt, lint, check types, and unit tests |
If you have bundled using make commands, you should be able to load your unpacked extension using a browser.
For loading unpacked extensions, see browser docs. Here are some examples:
A few gotchas...
- In Chrome, you select the dir containing
manifest.json(distdir). In Firefox, you select themanifest.jsonitself - Make sure your extension is enabled in private windows if testing in private windows...