{"id":20292061,"url":"https://github.com/apsislabs/chrome_extension_starter","last_synced_at":"2025-04-11T11:22:23.263Z","repository":{"id":55327862,"uuid":"152632054","full_name":"apsislabs/chrome_extension_starter","owner":"apsislabs","description":"A starter kit for Chrome Extensions","archived":false,"fork":false,"pushed_at":"2025-03-12T15:26:34.000Z","size":2295,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T07:41:36.378Z","etag":null,"topics":["chrome-extension","starter-project"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/apsislabs.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":"2018-10-11T17:45:51.000Z","updated_at":"2025-03-14T12:54:00.000Z","dependencies_parsed_at":"2024-06-20T01:12:45.381Z","dependency_job_id":null,"html_url":"https://github.com/apsislabs/chrome_extension_starter","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/apsislabs%2Fchrome_extension_starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fchrome_extension_starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fchrome_extension_starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fchrome_extension_starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apsislabs","download_url":"https://codeload.github.com/apsislabs/chrome_extension_starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382116,"owners_count":21094540,"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":["chrome-extension","starter-project"],"created_at":"2024-11-14T15:15:15.621Z","updated_at":"2025-04-11T11:22:23.230Z","avatar_url":"https://github.com/apsislabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chrome Extension Starter\n\nA starter kit for Chrome Extensions.\n\n## Setup\n\n### Rebranding\n\nCopy this project into a new folder and modify the following:\n\n* `package.json` - name, description, repository, homepage, bugs, author\n* `src/manifest.json` - name\n* `src/img/*` - Change these to your branding\n\n### Developing\n\n1. `npm install`\n2. Run `npm start`\n3. Load the extension on Chrome following:\n  1. Access `chrome://extensions/`\n  2. Check `Developer mode`\n  3. Click on `Load unpacked extension`\n  4. Select the `build` folder.\n  5. Extension will auto reload anytime webpack finishing compiling.\n4. Rejoice!\n\n### Change the Port\n\n`npm start` starts a [webpack server](https://webpack.github.io/docs/webpack-dev-server.html) to auto reload code as it is saved.\n\nYou can run the server on another port if you want. Just specify the env var `port` like this:\n\n```\n$ PORT=6002 npm start\n```\n\nor on Windows cmd:\n\n```\n$ set PORT=6002 npm start\n```\n\n**Note:** The [content scripts](https://developer.chrome.com/extensions/content_scripts) are excluded from hot reloading because they cannot connect to the local dev server since they run on different domains.\n\n### Scripts\n\n* `prebuild`: creates the `/builds` directory\n* `build`: uses [webpack](https://webpack.js.org/) to create the extension in `/build`\n* `postbuild`: zips the build into `/builds`\n* `start`: runs the dev server for hot reloading extension\n* `format`:  uses prettier to reformat the code\n* `lint`: runs eslint on the code\n* `lint-fix`: fixes any minor issues that eslint knows how to fix\n* `postversion`: executes the build after an increase in the npm version\n\n### Hooks\n\nGithooks are managed using [husky](https://github.com/typicode/husky) and are located in `package.json`\n\n* `pre-commit` - runs [pretty-quick](https://github.com/azz/pretty-quick) which runs [prettier](https://prettier.io/), an opinionated js formatter to help keep the code consistent\n* `pre-push` - runs [eslint](https://eslint.org/) which has some additional validation of formatting and best practices to help keep the code clean.\n\n## Packing\n\nTo create the compiled extension for distribution run:\n\n```\n$ npm run build\n```\nA new zip named `$npm_package_name-$npm_version.zip` will be created in `/builds`. This zip is ready to be submitted to the Chrome Web Store. Take a look at the [official guide](https://developer.chrome.com/webstore/publish) to more information about publishing.\n\n## What is going on where?\n\n* **/src**\n  * **/background**\n    * **/index.js** - Runs the background processes and can be inspected from the [chrome://extensions/](chrome://extensions/) page\n    * **/*.js** - Each background script should generally have 1 set of functionality. For example `open_options_page.js` opens the options page on extension update or installation.\n  * **/content-script**\n    * **/index.js** - Runs code on the current tab.\n    * **/*.js** - Each content-script should generally have 1 set of functionality. For example `console_notify.js` just logs information to the console on each page.\n  * **/img/*** - This is a home for any images shared by the *manifest.json*, *background*, *content-scripts*, *popup*, and *options*.\n  * **/util/*.js** - This is a home for any utility scripts you may build that need to be shared across *background*, *content-scripts*, *popup*, and *options*.\n  * **/view**\n    * **components/*.js** - This is a home for the React components used by *popup* and *options* pages.\n    * **popup/*.[html|js|scss]** - Runs when you click on the extension icon, and be inspected by right clicking on the popup.\n    * **options/*.[html|js|scss]** - Displays when you right click on the extension icon and select *Options*.\n  * **manifest.json** - Configuration information for the extension.  [Manifest Format](https://developer.chrome.com/apps/manifest)\n* **/utils** - helpers scripts for configuring builds\n* **/webpack** - Webpack configurations\n\n\n## Included Packages\n\nThis starter includes some default packages that always seem to be useful.\n\n* [axios](https://github.com/axios/axios) - Promised based HTTP Client\n* [Bootstrap 3](https://getbootstrap.com/docs/3.3/) and [React-Bootstrap](https://react-bootstrap.github.io) - Once react-bootstrap fully supports bootstrap 4 we will migrate to that as the default.\n* [chrome-extension-async](https://github.com/KeithHenry/chromeExtensionAsync#readme) - Promised based wrapper for built in chrome functions (normally callback style). You can mix and match between the normal and promise.\n* [jquery](https://jquery.com/) - Often used in content-scripts to manipulate the DOM of the current tab.\n* [Lodash](https://lodash.com) - useful utilities for common js problems.\n* [Moment.js](https://momentjs.com/) - date and time validation, parsing and manipulation.\n* [React](https://reactjs.org/) - Latest framework that fits our needs.\n\n## Special Thanks\n\nThanks to [Chrome Extension Webpack Boilerplate w/React](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/tree/react)!\n\n---\n\n# Built by Apsis\n\n[![apsis](https://s3-us-west-2.amazonaws.com/apsiscdn/apsis.png)](https://www.apsis.io)\n\n`chrome_extension_starter` was built by Apsis Labs. We love sharing what we build! Check out our [other libraries on Github](https://github.com/apsislabs), and if you like our work you can [hire us](https://www.apsis.io/work-with-us/) to build your vision.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Fchrome_extension_starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsislabs%2Fchrome_extension_starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Fchrome_extension_starter/lists"}