-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: chrome extension compatibility (#24)
* build: add chrome install script * build(webpack): add start extension in chrome browser * feat: migrate to manifest v3 * docs: update readme with new scripts * build(yarn): add scripts to install local browsers * refactor: remove scrolling bars * build: move browser installation to post install script * chore: squash * feat: add dynamic environment variables * chore: squash * build(webpack): only change target flag when setting target * build(deps): update web-ext package * build(webpack): seperate manifest files for different targets * fix: use browser action for firefox * build: remove extension id in code * refactor: convert import comments to lowercase * build: add voi network to dapp walletconnect namespace list * docs: update readme with new yarn scripts * ci: use new build process in pull request checks workflow * build: separate build directories between browsers * ci: update new manifest file with version * build(yarn): add script to package build * ci: add packages to release * ci: add new action to create a .env file * test: update env vars in test setup file * docs: update readme to include package scripts
- Loading branch information
1 parent
2d2b39a
commit 559e141
Showing
441 changed files
with
2,252 additions
and
1,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
WALLET_CONNECT_PROJECT_ID="Go to WalletConnect and get project ID" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Create Env File" | ||
|
||
description: "Creates an .env file" | ||
|
||
inputs: | ||
walletconnect_project_id: | ||
description: "WalletConnect project ID" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "📝 Create .env file" | ||
run: | | ||
rm -f .env | ||
echo "WALLET_CONNECT_PROJECT_ID=${{ inputs.walletconnect_project_id }}" >> .env | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,16 @@ | |
</h1> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/agoralabs-sh/kibisis-web-extension/actions/workflows/lint_build_test.yml" target="_blank"> | ||
<img src="https://github.com/agoralabs-sh/kibisis-web-extension/actions/workflows/lint_build_test.yml/badge.svg" alt="Build, lint and test" /> | ||
<a href="https://github.com/agoralabs-sh/kibisis-web-extension/actions/workflows/pull_request_checks.yml" target="_blank"> | ||
<img src="https://github.com/agoralabs-sh/kibisis-web-extension/actions/workflows/pull_request_checks.yml/badge.svg" alt="Pull Request Checks" /> | ||
</a> | ||
<a href="https://img.shields.io/amo/v/[email protected]" target="_blank"> | ||
<img src="https://img.shields.io/amo/v/[email protected]" alt="Mozilla add-on" /> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
An Algorand wallet browser extension to sign data, send transactions and rekey with another account. | ||
An AVM wallet in your browser that goes beyond just DeFi. | ||
</p> | ||
|
||
### Table of contents | ||
|
@@ -59,6 +59,7 @@ Coming soon... | |
### 3.1. Requirements | ||
|
||
* Install [Yarn v1.22.5+][yarn] | ||
* Install [jq][jq] | ||
|
||
<sup>[Back to top ^][table-of-contents]</sup> | ||
|
||
|
@@ -69,30 +70,39 @@ Coming soon... | |
$ yarn install | ||
``` | ||
|
||
> ⚠️ **NOTE:** a couple of post install scripts will run that will download and install Chrome and Firefox browser binaries at the project root. These binaries will be used for running development versions of the extension. | ||
2. In the newly created `.env` file, replace the environment values with the desired values. | ||
|
||
<sup>[Back to top ^][table-of-contents]</sup> | ||
|
||
### 3.3. Run | ||
|
||
* To run simply use: | ||
```bash | ||
$ yarn start | ||
$ yarn start:<chrome|firefox> | ||
``` | ||
|
||
This will bundle the Typescript source code and the add-on assets into a `build/` directory and once the build files have been bundled, Webpack will start the locally installed Firefox Developer Edition (located at [`./.firefox/`][local-firefox-dir]) with the local extension as a temporary add-on. | ||
> ⚠️ **NOTE:** this command will bundle the TypeScript source code and extension assets into the `.build/` directory and depending on your intended target (you can choose '`chrome`' or '`firefox`') the corresponding browser will start up with the unpacked extension as a temporary extension. | ||
<sup>[Back to top ^][table-of-contents]</sup> | ||
|
||
## 📑 4. Appendix | ||
|
||
### 4.1 Useful Commands | ||
|
||
| Command | Description | | ||
|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `yarn build` | Bundles the source code and the add-on assets in the `build/` directory. | | ||
| `yarn package` | Packages the contents of the `build/` directory into a `.zip` file, ready for submission. See [use `web-ext`][use-web-ext]. | | ||
| `yarn prettier` | Runs `prettier` with the same configuration that is run on the pre-commit hooks. | | ||
| `yarn start` | Bundles the source code & the add-on assets, starts the Firefox Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | | ||
| `yarn start:firefox` | Starts up the local Firefox Developer edition and installs the local add-on as a temporary add-on. | | ||
| Command | Description | | ||
|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `yarn build:chrome` | Bundles the source code and Chrome specific assets into the `.chrome_build/` directory. | | ||
| `yarn build:firefox` | Bundles the source code and Firefox specific assets into the `.firefox_build/` directory. | | ||
| `yarn install:chrome` | Installs the latest version of Chrome For Testing browser to the project root. This removes the existing version if it exists. | | ||
| `yarn install:firefox` | Installs the latest version of Firefox Developer Edition browser to the project root. This removes the existing version if it exists. | | ||
| `yarn package:chrome` | Packages the contents of the `.chrome_build/` directory into a `kibisis-chrome-{version}.zip` file, ready for submission. | | ||
| `yarn package:firefox` | Packages the contents of the `.firefox_build/` directory into a `kibisis-firefox-{version}.zip` file, ready for submission. | | ||
| `yarn prettier` | Runs `prettier` with the same configuration that is run on the pre-commit hooks. | | ||
| `yarn start:chrome` | Bundles the source code & the add-on assets, starts the local Chrome For Testing Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | | ||
| `yarn start:firefox` | Bundles the source code & the add-on assets, starts the local Firefox Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | | ||
| `yarn start:dapp` | Starts the example dApp at [http://localhost:8080](http://localhost:8080) | | ||
|
||
<sup>[Back to top ^][table-of-contents]</sup> | ||
|
||
|
@@ -110,8 +120,8 @@ Please refer to the [LICENSE][license] file. | |
|
||
<!-- Links --> | ||
[contribute]: ./CONTRIBUTING.md | ||
[jq]: https://github.com/jqlang/jq | ||
[license]: ./LICENSE | ||
[local-firefox-dir]: ./.firefox | ||
[table-of-contents]: #table-of-contents | ||
[use-web-ext]: https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/#using-web-ext-section | ||
[yarn]: https://yarnpkg.com/ |
Oops, something went wrong.