{"id":13524969,"url":"https://github.com/PiyushSuthar/preact-webext","last_synced_at":"2025-04-01T04:30:21.693Z","repository":{"id":115954971,"uuid":"394264405","full_name":"PiyushSuthar/preact-webext","owner":"PiyushSuthar","description":"⚡️ WebExtension Vite Starter Template with Preact","archived":false,"fork":false,"pushed_at":"2021-08-09T11:27:41.000Z","size":28,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T09:41:28.447Z","etag":null,"topics":["extension","extension-chrome","hacktoberfest","preact","typescript","web-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PiyushSuthar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-09T11:27:09.000Z","updated_at":"2024-04-14T16:00:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"49d6739d-a0e5-497e-85e7-f57b5fce9ce3","html_url":"https://github.com/PiyushSuthar/preact-webext","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushSuthar%2Fpreact-webext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushSuthar%2Fpreact-webext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushSuthar%2Fpreact-webext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushSuthar%2Fpreact-webext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiyushSuthar","download_url":"https://codeload.github.com/PiyushSuthar/preact-webext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246580546,"owners_count":20800113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","extension-chrome","hacktoberfest","preact","typescript","web-extension"],"created_at":"2024-08-01T06:01:14.995Z","updated_at":"2025-04-01T04:30:21.423Z","avatar_url":"https://github.com/PiyushSuthar.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Preact Webext\n\nA [Vite](https://vitejs.dev/) powered WebExtension ([Chrome](https://developer.chrome.com/docs/extensions/reference/), [FireFox](https://addons.mozilla.org/en-US/developers/), etc.) starter template with Preact.\n\n## Credits\n\nThis boilerplate is a shameless fork of [antfu/vitesse-webext](https://github.com/antfu/vitesse-webext). You can say that I have just forked, edited a few lines and pushed.\n\noops, I haven't even changed the Readme :p\n\n## Features\n\n- ⚡️ **Instant HMR** - use **Vite** on dev (no more refresh!)\n- ⚛ Preact - For my comfort!\n- 💬 Effortless communications - powered by [`webext-bridge`](https://github.com/antfu/webext-bridge)\n- 🦾 [TypeScript](https://www.typescriptlang.org/) - type safe\n- 🌍 WebExtension - isomorphic extension for Chrome, Firefox, and others\n- 📃 Dynamic `manifest.json` with full type support\n\n## Pre-packed\n\n### WebExtension Libraries\n\n- [`webextension-polyfill-ts`](https://github.com/Lusito/webextension-polyfill-ts) - WebExtension browser API Polyfill with types\n- [`webext-bridge`](https://github.com/antfu/webext-bridge) - effortlessly communication between contexts\n\n### Dev tools\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager\n- [tsup](https://github.com/egoist/tsup) - Zero config TypeScript bundler powered by esbuild\n- [esno](https://github.com/antfu/esno) - TypeScript / ESNext node runtime powered by esbuild\n- [npm-run-all](https://github.com/mysticatea/npm-run-all) - Run multiple npm-scripts in parallel or sequential\n\n## Use the Template\n\n### GitHub Template\n\n[Create a repo from this template on GitHub](https://github.com/PiyushSuthar/preact-webext/generate).\n\n### Clone to local\n\nIf you prefer to do it manually with the cleaner git history\n\n\u003e If you don't have pnpm installed, run: npm install -g pnpm\n\n```bash\nnpx degit piyushsuthar/preact-webext my-webext\ncd my-webext\npnpm i\n```\n\n## Usage\n\n### Folders\n\n- `views` - frontend for the extension (popup, options and new-tab).\n- `src` - background scripts and content scripts.\n  - `manifest.ts` - manifest for the extension.\n- `extension` - extension package root, also holds assets.\n- `scripts` - development helper scripts.\n\n### Development\n\n```bash\npnpm dev\n```\n\nThen **load extension in browser with the `extension/` folder**,\n\n### Build\n\nTo build the extension, run\n\n```bash\npnpm build\n```\n\nAnd then pack files under `extension`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPiyushSuthar%2Fpreact-webext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPiyushSuthar%2Fpreact-webext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPiyushSuthar%2Fpreact-webext/lists"}