Skip to content

Commit b041698

Browse files
author
Ioan Moldovan
authored
#5016 Add instructions on how to install development build to Chrome and Firefox (#5034)
* updated readme * fix: pr reviews
1 parent cec6348 commit b041698

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

README.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,35 @@ Mock tests: ![Mock tests](https://flowcrypt.semaphoreci.com/badges/flowcrypt-bro
1010

1111
Live tests: [![Live Tests](https://semaphoreci.com/api/v1/flowcrypt/flowcrypt-browser/branches/master/badge.svg)](https://semaphoreci.com/flowcrypt/flowcrypt-browser)
1212

13-
This project is written in TypeScript. Browsers only understand JavaScript, so the project needs to be transpiled. You need to build the project the first time you download it, and build it after each change you make to see the result in the browser. First, install tooling:
13+
This project is written in TypeScript. Browsers only understand JavaScript, so the project needs to be transpiled. You need to build the project the first time you download it, and build it after each change you make to see the result in the browser. To get started, please follow the instructions below:
1414

15+
1. Install the tooling by running the following command after navigating to the appropriate folder:
1516
```bash
1617
$ cd some/folder/flowcrypt-browser
1718
$ npm install
1819
```
20+
2. To build the project (currently available for Linux and Mac only), run the following command:
1921

20-
To build the project (for now Linux and Mac only)
21-
22-
```
23-
$ npm run-script build
24-
25-
> [email protected] build /home/luke/git/flowcrypt-browser
26-
> gulp
27-
28-
[02:42:04] Using gulpfile ~/git/flowcrypt-browser/gulpfile.js
29-
[02:42:04] Starting 'default'...
30-
[02:42:04] Starting 'flush'...
31-
[02:42:04] Finished 'flush' after 62 ms
32-
[02:42:04] Starting 'transpileProjectTs'...
33-
[02:42:04] Starting 'copySourceFiles'...
34-
[02:42:04] Starting 'copyVersionedManifest'...
35-
[02:42:05] Finished 'copyVersionedManifest' after 199 ms
36-
[02:42:05] Finished 'copySourceFiles' after 557 ms
37-
[02:42:12] Finished 'transpileProjectTs' after 7.57 s
38-
[02:42:12] Starting 'chromeBuildSpacesToTabs'...
39-
[02:42:12] Finished 'chromeBuildSpacesToTabs' after 4.55 ms
40-
[02:42:12] Starting 'copyChromeToFirefox'...
41-
[02:42:12] Finished 'copyChromeToFirefox' after 323 ms
42-
[02:42:12] Starting 'copyChromeToFirefoxEditedManifest'...
43-
[02:42:12] Finished 'copyChromeToFirefoxEditedManifest' after 10 ms
44-
[02:42:12] Finished 'default' after 7.97 s
22+
```bash
23+
$ npm run build
4524
```
25+
After running this command, you can find your built project in the `build/chrome-consumer` and `build/firefox-consumer` folders.
26+
27+
To load the extension in Google Chrome, please follow these steps:
28+
29+
1. Open your Chrome browser and navigate to `chrome://extensions/`.
30+
2. If not already enabled, toggle on the `Developer mode` switch located at the top-right corner.
31+
3. Click on the `Load Unpacked` button.
32+
4. Browse to and select the appropriate folder, either `build/chrome-consumer` or `chrome-enterprise`.
33+
34+
Similarly, to load the extension in Firefox, follow these steps:
35+
36+
1. Open your Firefox browser and navigate to `about:debugging`.
37+
2. Click on the `This Firefox` tab.
38+
3. Click on the `Load Temporary Add-on` button located at the top-right corner.
39+
4. Browse to and select the appropriate folder, either `build/firefox-consumer` or `firefox-enterprise`, and select the `manifest.json` file.
4640

47-
Now you can find your built project in `build/chrome-consumer` and `build/firefox-consumer`
41+
If you prefer, you can also use the `run_firefox` script (`npm run run_firefox`) included in the package.json file to run the Firefox extension in a separate instance without interfering with the production extension installed in your browser.
4842

4943
Printing debug data to test logs can be done using special `Debug` class:
5044
https://github.com/FlowCrypt/flowcrypt-browser/tree/master/extension/js/common/platform/debug.ts#L7

0 commit comments

Comments
 (0)