Skip to content

Commit ad52d82

Browse files
SuaYooShrinks99ikreymer
authored
Update documentation (#265)
## Changes - Document yarn and node versions - Streamline docs to reduce repetition of yarn install/build-dev steps --------- Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics> Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
1 parent 19fc1ba commit ad52d82

File tree

2 files changed

+57
-24
lines changed

2 files changed

+57
-24
lines changed

README.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,85 @@ Downloads for the desktop are are available on the [GitHub Releases page](https:
1818

1919
The extension makes use of the Chrome debugging protocol to capture and save network traffic, and extends the [ReplayWeb.page](https://github.com/webrecorder/replayweb.page) UI and the [wabac.js](https://github.com/webrecorder/wabac.js) service worker system for replay and storage.
2020

21-
The codebase for the extension and Electron app is shared, but they can both be deployed in different ways.
21+
## Development
2222

23-
## Building for Development
23+
The Chromium extension and Electron app are built from the same source code for ease of development.
2424

25-
To develop ArchiveWeb.page, install Node 12+ and Yarn.
25+
### Prerequisites
2626

27-
### Install the Development Extension
27+
- Node >=12
28+
- Yarn Classic (v1)
2829

29-
For development, the extension can be built locally and loaded as an unpacked extension. If you want to make changes to the extension, do the following:
30+
### Installation
3031

31-
1. Clone this repo. Run `yarn install; yarn build-dev`. (You can also run `yarn build` to build the production version but it may be harder to debug).
32+
To build the extension or Electron app locally for development, do the following:
3233

33-
2. Open the Chrome Extensions page ([chrome://extensions](chrome://extensions)).
34+
1. Clone this repo:
35+
```sh
36+
git clone https://github.com/webrecorder/archiveweb.page.git
37+
```
38+
2. Change the working directory:
39+
```sh
40+
cd archiveweb.page
41+
```
42+
3. Install dependencies:
43+
```sh
44+
yarn install
45+
```
46+
4. Make development build:
47+
```sh
48+
yarn build-dev
49+
```
3450

35-
3. Choose 'Load Unpacked Extension' and point to the `./dist/ext` directory in your local copy of this repo.
51+
The development build can now be used to develop the extension or Electron app.
3652

37-
4. Click the extension icon to show the extension popup, start archiving, etc...
53+
### Developing the Chromium extension
3854

39-
### Development Workflow (Extension)
55+
To install the extension locally, load the development build as an unpacked extension:
4056

41-
For development, it is recommended to use the dev build of the extension:
57+
1. Open the Chrome Extensions page ([chrome://extensions](chrome://extensions)).
4258

43-
1. Run `yarn install` and then `yarn run build-dev`
59+
2. Choose 'Load Unpacked Extension' and point to the `./dist/ext` directory in your local copy of this repo.
4460

45-
2. Run `yarn run start-ext` -- this will ensure the `dist/ext` directory is rebuilt after any changes to the source.
61+
3. Click the extension icon to show the extension popup, start archiving, etc...
4662

47-
3. After making changes, the extension still needs to be reloaded in the browser. From the Chrome extensions page, click the reload button to load the latest version.
63+
#### Update extension on code changes
4864

49-
4. Click the extension icon to show the extension popup, start recording, etc... The dev build of the extension will be grey to differntiate from the production version.
65+
To watch source code files and recompile the development build on change, run:
5066

51-
### Using the Electron App
67+
```sh
68+
yarn run start-ext
69+
```
5270

53-
To run the Electron app development build:
71+
Now, saving changes to source will automatically rebuild the `dist/ext` directory.
5472

55-
1. Clone this repo.
73+
After making changes, the extension still needs to be reloaded in the browser.
5674

57-
2. Run `yarn install` and then `yarn run build-dev`
75+
1. From the Chrome extensions page, click the reload button to load the latest version.
5876

59-
3. Run `yarn run start-electron` to start the app.
77+
2. Click the extension icon to show the extension popup, start recording, etc... The dev build of the extension will be a different color from the production version.
6078

61-
The Electron App version will open recording in a new window. It is is designed to support Flash, better support for IPFS sharing.
79+
### Developing the Electron app
6280

63-
### Development workflow (Electron App)
81+
To start the Electron app using development build:
82+
```sh
83+
yarn run start-electron
84+
```
6485

65-
After making changes, rerun `yarn run build-dev` and `yarn run start-electron` to load the app.
86+
The Electron app will open recording in a new window. It is is designed to support Flash, better support for IPFS sharing.
87+
88+
#### Update app on change
89+
90+
Currently, the dev workflow for the Electron app does not support automatically rebuilding on file changes.
91+
92+
After making changes, rerun `yarn run build-dev` and `yarn run start-electron` to view your changes in the app.
6693

6794
## Standalone Build
6895

6996
To create a platform-specific binary, run:
7097

71-
`yarn run pack`
98+
```sh
99+
yarn run pack
100+
```
72101

73102
The standalone app will then be available in the `./dist/` directory.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,9 @@
144144
"buildResources": "build",
145145
"output": "dist/bin/"
146146
}
147+
},
148+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
149+
"engines": {
150+
"node": ">=12"
147151
}
148152
}

0 commit comments

Comments
 (0)