NOTE: This section is intended for internal team members. If you are an external developer, please check this documentation.
Run the following commands to install dependencies and start developing
yarn install
yarn dev
yarn dev
- runwebpack
inwatch
mode using the "internal" variantyarn dev-public
- runwebpack
inwatch
mode using the "public" variantyarn storybook
- runs the Storybook serveryarn build
- builds the production-ready unpacked extensionyarn package
- packages the built code for uploadyarn test -u
- runs Jest + updates test snapshotsyarn lint
- runs Stylelint and ESLintyarn prettify
- runs Prettieryarn open-firefox
- opens Sporran in Firefoxyarn open-chrome
- opens Sporran in Chrome
- Go to actions page for "Packages the internal version".
- Click on the build you want to test.
- Download the extension file from the Artifacts section at the bottom.
- Unpack the downloaded sporran-???.zip file.
- Go to actions page for "Packages the public version".
- Click the buttons "Run workflow" -> "Run workflow" to prepare the public version and wait for the workflow to finish.
- Click the link for the just finished workflow and download the extension file from the Artifacts section at the bottom.
- Unpack the downloaded .zip file and unpack the sporran-???.zip from it as well.
Testing in Chrome
- Navigate to chrome://extensions.
- Enable Developer Mode by clicking the toggle switch next to Developer mode.
- Click the Load unpacked button and select the directory you have unpacked the extension into.
Testing in Firefox
- Navigate to about:debugging#/runtime/this-firefox.
- Click the Load Temporary Add-on... button.
- Select the manifest.json from the directory you have unpacked the extension into.
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.
This version will only connect to KILT Spiritnet blockchain via predefined node endpoints.
Run the following commands:
yarn install
yarn build-internal
yarn package
This will generate a file dist/web-ext-artifacts/sporran-???.zip
ready for developers to use.
This version will connect to any node endpoints the user inputs and by default to the KILT Peregrine blockchain.
We recommend external developers to download the test version of the Sporran extension from the releases page on GitHub.
The uploads to this page occur manually.
Only Sporran versions using changes merged to main
should be published as releases.
To get a releasable Sporran Extension file you could either build and package it locally or, alternatively, follow these steps:
- Merge the wished changes to
main
. - Go to the Sporran GitHub's Actions page for "Packages the internal version".
- Click on the workflow of the wished commit.
- Download the artifact.
Before updating it to the release page, please prepend a "TEST-" to the zip file's name. If you got the extension from the GitHub workflow, it would be nice to replace the commit hash with the Sporran version on the zip's name.
To upload:
- Go to the releases page.
- Copy title and description of an older release.
- Click on Draft a new release
- Paste title and description and attach the Sporran extension zip file.
- Choose as tag the version of Sporran being released. You can directly create the tag while publishing the release.
- Publish the release.