Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates and docs strategy suggestion - kitchen sink #235

Open
dandv opened this issue Dec 20, 2024 · 3 comments
Open

Templates and docs strategy suggestion - kitchen sink #235

dandv opened this issue Dec 20, 2024 · 3 comments

Comments

@dandv
Copy link

dandv commented Dec 20, 2024

Inspired by #224, I would like to suggest creating an "everything" / kitchen-sink TypeScript example template for the latest version of each of the front-end libraries listed at https://github.com/extension-js/extension.js?tab=readme-ov-file#web-standards-and-modern-javascript-support (React 19, Vue 3, Svelte 5, Preact 10), and documentation on how components (new tab, background script, action, content, side panel) are wired up, so other contributors can remove them individually.

That I think would be the fastest way to get started with writing cross-browser extensions, and would enable others to contribute slimmed down versions easily (e.g. "TypeScript Svelte Content + Background only"), if that would still be viewed as useful.

Eventually example create could ask wizard-style Y/N questions about the inclusion of each component, but the bundling and transpiling and wiring up part is the magic that needs to be spelled out.

@cezaraugusto
Copy link
Member

hey @dandv, it makes a lot of sense. I added a comment in #224 and I think this could work very well. something like:

npx extension create my-extension --template=react
npx extension create my-extension --template=vue
npx extension create my-extension --template=svelte
npx extension create my-extension --template=preact

and these templates would be more complete and offer a closer match to other standalone browser extension templates like the ones mentioned in #224

I'm going to check out the errors in the current Svelte template so we can better support it but more than happy to review the new kitchen-sink framework templates

@dandv
Copy link
Author

dandv commented Dec 22, 2024

Once Svelte is upgraded to the latest, I can take a stab at a progressively-filled :) kitchen sink template for it, starting with new tab, content script, background, and options pages. Cross-browser support is important for me too.

@cezaraugusto
Copy link
Member

@dandv v2.0.0-beta.8 should be good to go 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants