Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 3.18 KB

internal.md

File metadata and controls

83 lines (59 loc) · 3.18 KB

Develop, test and deploy

NOTE: This section is intended for internal team members. If you are an external developer, please check this documentation.

Getting Started

Run the following commands to install dependencies and start developing

yarn install
yarn dev

Scripts

  • yarn dev - run webpack in watch mode
  • yarn storybook - runs the Storybook server
  • yarn build - builds the production-ready unpacked extension
  • yarn package - packages the built code for upload
  • yarn test -u - runs Jest + updates test snapshots
  • yarn lint - runs Stylelint and ESLint
  • yarn prettify - runs Prettier
  • yarn open-firefox - opens Sporran in Firefox
  • yarn open-chrome - opens Sporran in Chrome

Testing in browser

Getting the internal version of extension

  1. Go to actions page for "Packages the internal version".
  2. Click on the build you want to test.
  3. Download the extension file from the Artifacts section at the bottom.
  4. Unpack the downloaded .zip file and unpack the sporran-???.zip from it as well.

Getting the public version of extension

  1. Go to actions page for "Packages the public version".
  2. Click the buttons "Run workflow" -> "Run workflow" to prepare the public version and wait for the workflow to finish.
  3. Click the link for the just finished workflow and download the extension file from the Artifacts section at the bottom.
  4. Unpack the downloaded .zip file and unpack the sporran-???.zip from it as well.

Testing in Chrome

  1. Navigate to chrome://extensions.
  2. Enable Developer Mode by clicking the toggle switch next to Developer mode.
  3. Click the Load unpacked button and select the directory you have unpacked the extension into.

Testing in Firefox

  1. Navigate to about:debugging#/runtime/this-firefox.
  2. Click the Load Temporary Add-on... button.
  3. Select the manifest.json from the directory you have unpacked the extension into.

Build and package for uploading

Update the version in src/static/manifest.json and src/configuration/configuration.ts.

Run the following commands:

yarn install
yarn build
yarn package

This will generate a file dist/web-ext-artifacts/sporran-???.zip ready to be uploaded to stores.

Built with

Misc. References