redhat-developer / try-in-dev-spaces-browser-extension

MIT License
0 stars 4 forks source link

Try in Dev Spaces Browser Extension

Contribute

This web extension adds a Dev Spaces button on every GitHub repository page that starts a new workspace based on the current repository.

GitHub button example

By default, the new workspace is created on the Eclipse Che® hosted by Red Hat instance.

Additional Dev Spaces (and upstream Eclipse Che®) instances can configured from the extension's options.

Downloading the extension

Chromium-based browsers Safari Firefox

Extension permissions

Building and running locally

The extension can be built for both Chromium based browsers and for Firefox/Safari. There are two builds because the two platforms have different manifest V3 definitions.

  1. Download dependencies.

    $ yarn
  2. Run the build.

       To build for Chromium-based browsers:

$ yarn build

       To build for Safari:

$ yarn build:safari

       To build for Firefox:

$ yarn build:firefox

       Once complete, the built extension will be located in either dist/chromium or dist/safari or dist/firefox.

       For development, run yarn watch, yarn watch:safari, or yarn watch:firefox to watch the source files to recompile on changes.

  1. Sideload the extension located under the dist folder into your web browser. For instructions for different web browsers, refer to CONTRIBUTING.md.

Running and sideloading the production build

Chromium-based browsers (Google Chrome, Microsoft Edge, Brave, etc.)

yarn build:prod

The built location is located in dist/chromium.

For Safari

# the built extension is located in dist/safari-firefox
yarn build:prod-safari

The built location is located in dist/safari-firefox.

For Firefox

# the built extension is located in dist/firefox
yarn build:prod-firefox

The built location is located in dist/safari-firefox.

Sideloading the extension into the web browser

Refer to CONTRIBUTING.md.

Building zip files for Chromium and Firefox releases

Run the following command to build and create a zip file required when uploading to the Chrome Web Store and the Firefox Add-on Marketplace.

The Chromium extension zip file will be generated under zip/chromium.zip and the Firefox add-on zip will be generated under zip/firefox.zip.

yarn build:zip

Running tests

$ yarn test