You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-22Lines changed: 27 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,23 +16,23 @@ Find out more about how to use the extension as a Dapp developper, cookbook, as
16
16
17
17
## Firefox installation from source instructions.
18
18
19
-
1. Uncompress `master-src.zip`
19
+
1. Uncompress `master-ff-src.zip`
20
20
2. Run `corepack enable`[More information](https://github.com/nodejs/corepack?tab=readme-ov-file#corepack-enable--name)
21
21
2. Install dependencies via `yarn install`
22
22
3. Build all packages via `yarn build`
23
-
- The `/packages/extension/build` directory will contain the exact code used in the add-on, and should exactly match the uncompressed `master-build`.
23
+
- The `/packages/extension/build` directory will contain the exact code used in the add-on, and should exactly match the uncompressed `master-ff-build`.
24
24
25
-
NOTE: If you would like to regenerate the compressed `master-build.zip`, and `master-src.zip` files run: `yarn build:zip`
25
+
NOTE: If you would like to regenerate the compressed `master-ff-build.zip`, and `master-ff-src.zip` files run: `yarn build:zip:ff`
26
26
27
-
## Ensuring `master-build` and `master-src` dont have any diffs (For maintainers)
27
+
## Ensuring `master-<TARGET-BROWSER>-build` and `master-<TARGET_BROWSER>-src` dont have any diffs (For maintainers)
28
28
29
29
Summary: These are the steps to ensure the following builds don't have any diffs so that the firefox review goes smoothly.
30
30
31
-
1. Run `yarn build`
32
-
2. Run `yarn build:zip`- This will generate a `master-build.zip`, and `master-src.zip`.
33
-
3. Move `master-src.zip`, and `master-build.zip` to its own enviornment/folder.
34
-
4. Uncompress `master-src.zip` to `master-zrc` and inside of `master-src` run `yarn && yarn build`.
35
-
5. Uncompress `master-build.zip` to `master-build`.
31
+
1. Run `yarn build:ff` or `yarn build:chrome`, depending on your target browser.
32
+
2. Run `yarn build:zip:ff` or `yarn build:zip:chrome`- This will generate a `master-<TARGET_BROWSER>-build.zip`, and `master-<TARGET_BROWSER>-src.zip`.
33
+
3. Move `master-<TARGET_BROWSER>-src.zip`, and `master-<TARGET_BROWSER>-build.zip` to its own enviornment/folder.
34
+
4. Uncompress `master-<TARGET_BROWSER>-src.zip` to `master-src` and inside of `master-src` run `yarn && yarn build:<ff|chrome>`, depending on your target browser.
35
+
5. Uncompress `master-<TARGET_BROWSER>-build.zip` to `master-build`.
36
36
6. Now we can compare the two builds using `diff`, and `comm`
37
37
- Run `diff -qr <path-to-master-build>/master-build <path-to-master-src>/packages/extension/build | sort`
38
38
7. To sanity check important files (`background.js`, and `extension.js`) you can also run:
@@ -43,19 +43,22 @@ Summary: These are the steps to ensure the following builds don't have any diffs
43
43
44
44
Steps to build the extension and view your changes in a browser:
45
45
46
-
1. Build via `yarn build`
47
-
- NOTE: You may need to enable corepack by running `corepack enable`
48
-
2. Install the extension
49
-
- Chrome:
50
-
- go to `chrome://extensions/`
51
-
- ensure you have the Development flag set
52
-
- "Load unpacked" and point to `packages/extension/build`
53
-
- if developing, after making changes - refresh the extension
54
-
- Firefox:
55
-
- go to `about:debugging#addons`
56
-
- check "Enable add-on debugging"
57
-
- click on "Load Temporary Add-on" and point to `packages/extension/build/manifest.json`
58
-
- if developing, after making changes - reload the extension
46
+
1. Chrome:
47
+
1. Build via `yarn build:chrome`
48
+
- NOTE: You may need to enable corepack by running `corepack enable`
49
+
2. Install the extension
50
+
- go to `chrome://extensions/`
51
+
- ensure you have the Development flag set
52
+
- "Load unpacked" and point to `packages/extension/build`
53
+
- if developing, after making changes - refresh the extension
54
+
2. Firefox
55
+
1. Build via `yarn build:ff`
56
+
- NOTE: You may need to enable corepack by running `corepack enable`
57
+
2. Install the extension
58
+
- go to `about:debugging#addons`
59
+
- check "Enable add-on debugging"
60
+
- click on "Load Temporary Add-on" and point to `packages/extension/build/manifest.json`
61
+
- if developing, after making changes - reload the extension
59
62
3. When visiting `https://polkadot.js.org/apps/` it will inject the extension
60
63
61
64
Once added, you can create an account (via a generated seed) or import via an existing seed. The [apps UI](https://github.com/polkadot-js/apps/), when loaded, will show these accounts as `<account name> (extension)`
@@ -69,6 +72,8 @@ The repo is split into a number of packages -
69
72
-[extension-dapp](packages/extension-dapp/) - A convenience wrapper to work with the injected objects, simplifying data extraction for any dapp that wishes to integrate the extension (or any extension that supports the interface)
70
73
-[extension-inject](packages/extension-inject/) - A convenience wrapper that allows extension developers to inject their extension for use by any dapp
71
74
75
+
It also contains a [`manifest_chrome.json`](packages/extension/manifest_chrome.json) file which contains the manifest configuration for Chrome and another [`manifest_firefox.json`](packages/extension/manifest_firefox.json) with the configuration for Firefox, for compatibility reasons, and a dummy `manifest.json` file that's only used by the build.
76
+
72
77
## Dapp developers
73
78
74
79
The actual in-depth technical breakdown is given in the next section for any dapp developer wishing to work with the raw objects injected into the window. However, convenience wrappers are provided that allows for any dapp to use this extension (or any other extension that conforms to the interface) without having to manage any additional info.
Copy file name to clipboardExpand all lines: packages/extension-base/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,6 @@ Functions, classes and other utilities used in `@polkadot/extension`. These incl
7
7
8
8
They are primarily meant to be used in `@polkadot/extension`, and can be broken without any notice to cater for `@polkadot/extension`'s needs.
9
9
10
-
They are exported here if you wish to use part of them in the development of your own extension. Don't forget to add `process.env.EXTENSION_PREFIX` to separate ports and stores from the current extension's ones.
10
+
They are exported here if you wish to use part of them in the development of your
11
+
own extension. Don't forget to add `process.env.EXTENSION_PREFIX` to separate
12
+
ports and stores from the current extension's ones.
0 commit comments