To package and distribute the Chrome extension from the provided GitHub repository (https://github.com/screenly/chrome-extension/), follow these steps:
- Prepare the extension for packaging
Make sure you have the necessary files for the extension. In the provided repository, you will find the following files and directories:
manifest.json
: This file contains the basic information about the extension.src
: This directory contains the source code of the extension.package.json
: This file includes the dependencies and scripts for building the extension.
- Build the extension
The project already includes a build script using webpack. To build the extension, run the following command:
npm run build
This command generates the compiled and minified files in the dist
directory.
- Create the extension package
After building the extension, you need to create a .crx file, which is the packaged format for Chrome extensions. Run the following command:
chromium-browser --pack-extension=dist
This command generates a .crx file and a .pem file in the dist directory. The .crx file is the packaged extension you need to distribute.
- Distribution options
You have two options for distributing the extension:
Docker Desktop Extensions Marketplace: Docker Desktop allows you to publish your Chrome extension in their marketplace. This option is recommended if you want to reach a larger audience. To publish your extension, follow the instructions in the Docker documentation.
Manual distribution: You can also distribute the extension manually by providing the .crx file to users. Users can then install the extension manually by dragging the .crx file into the Chrome Extensions page (chrome://extensions).
- Updating the extension
If you need to update the extension, increment the version number in the manifest.json
file and repeat the packaging and distribution steps. Users can update the extension by dragging the new .crx file into the Chrome Extensions page.
Quoted sources:
- Marketplace extensions | Docker Docs
- Using JavaScript to hack the web | Opensource.com
- Docker Desktop release notes | Docker Docs
- Kogito tooling for friendly DMN and BPMN visualization on GitHub | Red Hat Developer
- Publish your extension to the marketplace | Docker Docs
- Package and release your extension | Docker Docs