{"id":13630037,"url":"https://github.com/antony/sveltekit-adapter-browser-extension","last_synced_at":"2025-03-16T12:31:52.925Z","repository":{"id":37236211,"uuid":"421343704","full_name":"antony/sveltekit-adapter-browser-extension","owner":"antony","description":"Build browser extensions with Svelte (early prototype)","archived":false,"fork":false,"pushed_at":"2023-06-06T20:21:19.000Z","size":39,"stargazers_count":159,"open_issues_count":9,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-13T22:53:51.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-26T08:31:15.000Z","updated_at":"2024-04-12T23:06:47.000Z","dependencies_parsed_at":"2024-01-13T14:44:07.568Z","dependency_job_id":"b4ee4319-aa69-4f6b-96af-adb4cfae9c4f","html_url":"https://github.com/antony/sveltekit-adapter-browser-extension","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsveltekit-adapter-browser-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsveltekit-adapter-browser-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsveltekit-adapter-browser-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony%2Fsveltekit-adapter-browser-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antony","download_url":"https://codeload.github.com/antony/sveltekit-adapter-browser-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221663541,"owners_count":16859840,"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":[],"created_at":"2024-08-01T22:01:28.115Z","updated_at":"2024-10-27T10:33:05.639Z","avatar_url":"https://github.com/antony.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# sveltekit-adapter-browser-extension\n\n[Adapter](https://kit.svelte.dev/docs#adapters) for SvelteKit which turns your app into a cross-platform browser extension.\n\n## Usage\n\nInstall with `npm i -D sveltekit-adapter-browser-extension`, then add the adapter to your `svelte.config.js`.\n\nSome additional configuration is required for this adapter to work - you need to (1) set ``appDir`` to something without an underscore and (2) tell kit to prerender its pages by default:\n\n```js\n// svelte.config.js\nimport adapter from 'sveltekit-adapter-browser-extension';\n\nexport default {\n\tkit: {\n\t\tadapter: adapter({\n\t\t\t// default options are shown\n\t\t\tpages: 'build', // the output directory for the pages of your extension\n\t\t\tassets: undefined, // the asset output directory is derived from pages if not specified explicitly\n\t\t\tfallback: undefined, // set to true to output an SPA-like extension\n\t\t\tmanifestVersion: 3 // the version of the automatically generated manifest (Version 3 is required by Chrome).\n\t\t}),\n\t\tappDir: 'ext', // This is important - chrome extensions can't handle the default _app directory name.\n\t\tprerender: {\n\t\t\tdefault: true\n\t\t}\n\t}\n};\n```\n\n## Try it\n\nAn example barebone app exists at `./example-app`. You can `npm run build` here and install the extension.\n\n### To try with your own app:\n\nInstall the adapter and `npm run build`. Go to your browser's extension page and install unpacked extension - point it at the build directory within your app.\n\nIf you get an error about `_app` being a disallowed folder, delete `_app` from within the build dir. It appears there sometimes and I'm not sure why - I'll fix as soon as possible!\n\n## Configuration\n\nTo specify your own manifest information (it will be merged with the generated one), simply have a manifest file local within your app directory.\n\n## Roadmap\n\nI am looking for help to build and maintain this module. Roadmap is:\n\n* Specifying the type of extension via config\n* Allowing icons and such to be driven by configuration\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fsveltekit-adapter-browser-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantony%2Fsveltekit-adapter-browser-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony%2Fsveltekit-adapter-browser-extension/lists"}