Skip to content

Commit

Permalink
Add firefox installation from src instructions (#1371)
Browse files Browse the repository at this point in the history
* Add firefox installation from src instructions

* Update build script for src code

* add corepack enable

* Add corepack enable to docs for dev
  • Loading branch information
TarikGul authored Jun 18, 2024
1 parent 80169c3 commit 43d1d7b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ jobs:
node-version: 'lts/*'
- name: ${{ matrix.step }}
run: |
corepack enable
yarn install --immutable
yarn ${{ matrix.step }}
1 change: 1 addition & 0 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
GH_RELEASE_FILES: master-build.zip,master-src.zip
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
corepack enable
yarn install --immutable
yarn ${{ matrix.step }}
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ logFilters:
level: discard

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# polkadot{.js} extension

**Important** Please be aware, this repository has not had a release to the google or firefox store in over 2 years which leaves the store version out of sync with the latest release of this extension.

A very simple scaffolding browser extension that injects a [@polkadot/api](https://github.com/polkadot-js/api) Signer into a page, along with any associated accounts, allowing for use by any dapp. This is an extensible POC implementation of a Polkadot/Substrate browser signer.

As it stands, it does one thing: it _only_ manages accounts and allows the signing of transactions with those accounts. It does not inject providers for use by dapps at this early point, nor does it perform wallet functions where it constructs and submits txs to the network.
Expand All @@ -16,11 +14,21 @@ As it stands, it does one thing: it _only_ manages accounts and allows the signi
## Documentation and examples
Find out more about how to use the extension as a Dapp developper, cookbook, as well as answers to most frequent questions in the [Polkadot-js extension documentation](https://polkadot.js.org/docs/extension/)

## Firefox installation from source instructions.

1. Uncompress `master-src.zip`
2. Run `corepack enable` [More information](https://github.com/nodejs/corepack?tab=readme-ov-file#corepack-enable--name)
2. Install dependencies via `yarn install`
3. Build all packages via `yarn build`
- The `/packages/extension/build` will contain the exact code used in the add-on
4. To regenerate the dst, and src compressed files run: `yarn build:zip`

## Development version

Steps to build the extension and view your changes in a browser:

1. Build via `yarn build`
- NOTE: You may need to enable corepack by running `corepack enable`
2. Install the extension
- Chrome:
- go to `chrome://extensions/`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build:rollup": "polkadot-exec-rollup --config",
"build:zip": "yarn build:zip:dst && yarn build:zip:src",
"build:zip:dst": "rm -rf ./master-build.zip && cd packages/extension/build && zip -r -FS ../../../master-build.zip .",
"build:zip:src": "rm -rf ./master-src.zip && zip -r -x '*build/*' -x '*node_modules*' -FS ./master-src.zip packages .editorconfig .eslintignore .eslintrc.js babel.config.cjs CHANGELOG.md CONTRIBUTING.md i18next-scanner.config.js LICENSE package.json README.md tsconfig.json yarn.lock",
"build:zip:src": "rm -rf ./master-src.zip && zip -r -x '*build/*' -x '*node_modules*' -FS ./master-src.zip packages .editorconfig eslint.config.js rollup.config.js CHANGELOG.md CONTRIBUTING.md i18next-scanner.config.cjs LICENSE package.json README.md tsconfig.json yarn.lock .yarnrc.yml tsconfig.base.json tsconfig.build.json tsconfig.eslint.json tsconfig.webpack.json",
"clean": "polkadot-dev-clean-build",
"lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only",
Expand Down

0 comments on commit 43d1d7b

Please sign in to comment.