Build upon amazing wxt framework.
dev:
- eslint-config: See eslint
- bumpp: use
bun bump
- update
nameinpackage.json, it will be zip file name - update
titleanddescriptioninsrc/locales, these will appear in the Chrome Web Store - update
default_localeinwxt.config.tsif noten - replace
icon.pnginsrc/assets - run
bun bump minor - mvp
- run
bun bump major - publish
optional:
- update
README.md - add extension url to
README.md - setup cli submit
Find more at wxt.dev/examples
Move the predefined entry points from the entrypoints.inactive folder to directly in the entrypoints folder to enable them.
Popup is enabled by default.
*: For onboarding, to retrieve the URL of the onboarding page, use chrome.runtime.getURL('/onboarding.html').
If you are using vscode, autofix should already be enabled. You can run bun lint to check for errors and bun lint:fix to fix most of them.
Thanks for antfu's elegant design philosophy in eslint configuration.
To use it, refer to the documentation
tldr: To add components using
npx shadcn@latest add, select them by pressingspaceand submit withenter. If adding a code file, simply type the component name for autocompletion in vscode.
-
You need to manually upload the extension to the Chrome Web Store the first time. After that, you can get the
CHROME_EXTENSION_ID. -
Rename the file
.env.submit.exampleto.env.submitand fill in theCHROME_EXTENSION_ID. -
Add the following settings to your shell config file. Keep them safe. See https://github.com/fregante/chrome-webstore-upload-keys for how to get the keys.
export CHROME_CLIENT_ID="<your client id>" export CHROME_REFRESH_TOKEN="<your refresh token>" export CHROME_CLIENT_SECRET="<your client secret>"
-
Now you can run
bun submit:latestfor faster submission.
bun submit:latestis an alias forbun exec 'rm -rf .output'; wxt zip && wxt submit --chrome-zip .output/*.zip