{"id":21707743,"url":"https://github.com/aminoffz/bun-browser-extension-builder","last_synced_at":"2025-08-10T15:06:44.935Z","repository":{"id":196151584,"uuid":"694662153","full_name":"AminoffZ/bun-browser-extension-builder","owner":"AminoffZ","description":"A tool for quickstarting your browser extension development. Powered by Bun!","archived":false,"fork":false,"pushed_at":"2023-09-22T09:10:12.000Z","size":68,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T16:15:42.972Z","etag":null,"topics":["browser-extensions","bun","template","typescript"],"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/AminoffZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-21T12:51:50.000Z","updated_at":"2025-03-31T14:24:07.000Z","dependencies_parsed_at":"2024-08-22T13:13:29.118Z","dependency_job_id":"451f8928-8902-4bf4-88ac-dbbf404c69cd","html_url":"https://github.com/AminoffZ/bun-browser-extension-builder","commit_stats":null,"previous_names":["aminoffz/bun-browser-extension-builder"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/AminoffZ/bun-browser-extension-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fbun-browser-extension-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fbun-browser-extension-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fbun-browser-extension-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fbun-browser-extension-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AminoffZ","download_url":"https://codeload.github.com/AminoffZ/bun-browser-extension-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AminoffZ%2Fbun-browser-extension-builder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269740324,"owners_count":24467753,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["browser-extensions","bun","template","typescript"],"created_at":"2024-11-25T22:19:04.628Z","updated_at":"2025-08-10T15:06:44.904Z","avatar_url":"https://github.com/AminoffZ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/AminoffZ/bun-browser-extension-builder/main/public/images/icon256.png\" align=\"right\" width=\"128\" title=\"hover text\"\u003e\n\n# Browser extension builder with Bun\n\nQuickstart your extension development by using this repository!\n\n## Features\n\n- Typescript for type safe development\n- Bun for blazing fast development\n- Manifest version 3 for faster publishing on Chrome\n\n## Develop\n\n### Setup\n\nClone the project, navigate into folder using terminal and run:\n```bash\nbun install\n```\n\n### Adding behaviour\n\n#### 0. Before starting\n\nMake sure you have some understanding of extension development. Here are some resources:\n\n- [Chrome](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/)\n- [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension)\n\n#### 1. Manifest\n\nThe manifest is a JSON file that defines the extension's name, version, functionality, permissions, and other details. It is required for all browser extensions and must be carefully constructed to ensure the extension is secure and efficient (and works).\n\nFor additional information visit the [Chrome](https://developer.chrome.com/docs/extensions/mv3/manifest/) manifest documentation page. Please note that some browsers, like [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings), require specific information for extensions to work.\n\n#### 2. JavaScript\n\nTo add/modify code, modify the files in the _src/scripts/_ folder. They will be compiled to JavaScript when you build the extension. Look at **Build** for more information.\n\n#### What is a _content.ts_/_script.ts_?\n\nTLDR: I mainly use content.js/ts to add other scripts or files to the DOM when loaded. I use script.js/ts for almost everything else.\n\nA content script is a JavaScript file that runs in the context of a web page and can modify its content and behavior. The content script can read and modify the HTML, CSS, and JavaScript of the web page, and can be used to add new functionality, modify existing functionality, or manipulate the content of the page in various ways.\n\nThe name \"content.js\" is often used as a convention to indicate that the file contains the code for a content script. However, developers are free to use any filename they like for their content script.\n\nOn the other hand, \"script.js\" is a generic name that could be used for any JavaScript file used in an extension, including background scripts, popup scripts, options page scripts, or any other script file that the extension may use.\n\nIn summary, \"content.js\" specifically refers to the file that contains the code for a content script, while \"script.js\" is a more generic name that could refer to any JavaScript file used in an extension.\n\n#### 3. CSS\n\nTo add CSS, create or modify files in the _public/styles/_ folder and make sure they are referenced in the manifest.\n\n#### 4. HTML\n\nHTML can be added [programmatically](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) using JavaScript.\n\n#### 5. Changing the icon\n\n_public/images/icon256.png_\n\n#### 6. Testing your extension\n\nThankfully you don't have to get your extension published before being able to test it. Refer to **0. Before starting** for information about testing an extension, also referred to as loading unpacked extensions. You do however need to build the extension to be able to test it, refer to the next section for this step.\n\n## Build\n\nTo build the extension, run:\n```bash\t\nbun run build\n```\nThis will create a new folder called _build/_ with the extension files. The folder will contain the following files by default:\n- Anything in _public/_ (images, styles, manifest etc.)\n- .js and .ts files in _src/scripts/_\nThis folder can be loaded as an unpacked extension in your browser.\nThe files that end up in the build folder _build/_ are configured in _bundler.ts_.\n\n## Other items\n\n### Formatting\n\nI added a .prettierrc for contributing. If building for your own purposes, feel free to remove it.\nTo format with the provided configuration, run:\n```bash\nbun run format\n```\n\n# License\n\nMIT License\n\nCopyright (c) 2023 AminoffZ\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminoffz%2Fbun-browser-extension-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faminoffz%2Fbun-browser-extension-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminoffz%2Fbun-browser-extension-builder/lists"}