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

MIT License
0 stars 4 forks source link

Split Safari and Firefox builds #76

Closed dkwon17 closed 1 year ago

dkwon17 commented 1 year ago

Currently, to build/watch the extension for Safari or Firefox, the commands to do so are:

yarn watch:sf
yarn build:sf
yarn build:prod-sf

which builds the extension and places it in the dist/safari-firefox folder.

In other words, the Safari and Firefox extension build is currently the same.

However, due to #73 , which adds the optional_host_permissions in the manifest, the issue is that Firefox does not currently support this field, and instead, is merged with optional_permissions instead (see the note in the Firefox Host Permissions doc).

As a result, this PR splits the Safari and Firefox build commands (ex. yarn build:sf) to two different build commands (yarn build:safari and yarn build:firefox)

To test this extension:

  1. checkout this extension and run:

    yarn
  2. Run:

    yarn build (or yarn watch)

    and verify that the dist/chromium folder is created

  3. Run:

    yarn build:safari (or yarn watch:safari)

    and verify that the dist/safari folder is created

  4. Run:

    yarn build:firefox (or yarn build:firefox)

    and verify that the dist/firefox folder is created