Skip to content

Commit 2c351e8

Browse files
committed
📝 Update and expand development documentation
1 parent 67bf523 commit 2c351e8

File tree

1 file changed

+54
-7
lines changed

1 file changed

+54
-7
lines changed

README.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,61 @@ For a detailed overview of the features and settings, please see the [Getting St
5252
If you would like to help with development, but don't have experience coding, its very helpful to have users test a release candidate before actually publishing it to everyone. If you are interested in testing new versions see [this page](https://github.com/richardfrost/AdvancedProfanityFilter/wiki/Beta-Testing) for more information.
5353

5454
## Development
55-
This project is written in TypeScript, and during the build/package process it will be converted to JS. Please see `package.json`'s scripts for more info on the process.
55+
### Quick Start
56+
After downloading/cloning the repository, run the following commands to get started:
5657

57-
Getting started
58-
```
58+
```sh
59+
# Install dependencies
5960
npm install
60-
```
6161

62-
To Build the extension
63-
```
64-
npm run package
62+
# Build the extension for the default target browser for local development
63+
# See table below for supported targets
64+
npm run build
6565
```
66+
Once the extension has been built, you can load the unpacked extension (found in `dist/`) in your browser.
67+
68+
### Stages
69+
| Stage | Output | Description |
70+
|---------|--------------------------|---------------------------------------------------|
71+
| build | `dist/` | Build/compile the extension for local development |
72+
| package | `extension-target.zip` | Package the files for the target browser |
73+
| release | `extension-target.zip` | Create an official release for a target browser |
74+
75+
### Targets
76+
| Target | Browser |
77+
|---------|--------------------|
78+
| v3* | Chrome, Edge, etc. |
79+
| v2 | Chrome, Edge, etc. |
80+
| firefox | Firefox |
81+
| safari | Safari (MacOS/iOS) |
82+
83+
_* = default target_
84+
85+
### Scripts
86+
For all scripts, please see `package.json`.
87+
88+
#### Commonly used scripts
89+
| Target | Stage | Script | Description |
90+
|---------|---------|--------------------------|-----------------------------------|
91+
| v3 | build | `npm run build:v3` | Development build for Manifest V3 |
92+
| v2 | build | `npm run build:v2` | Development build for Manifest V2 |
93+
| firefox | build | `npm run build:firefox` | Development build for Firefox |
94+
| safari | build | `npm run build:safari` | Development build for Safari |
95+
| safari | release | `npm run package:safari` | Official release for safari |
96+
| | release | `npm run release:all` | Official relase for all targets |
97+
98+
### State files
99+
The state files hold the details about the current build. These files are managed by `bin/prebuild.mjs`.
100+
101+
- `.build.json`
102+
- Current development target details
103+
- This is used for active development, and allows the developer to run simple commands such as `npm run build` to rebuild the project for the target specified in the file
104+
- `.release.json`
105+
- Current release target details
106+
- Takes precedence over `.build.json`, but gets removed after release is finished
107+
108+
#### Details contained in state files:
109+
- `config`: Overrides for the target
110+
- `manifestVersion`: Manifest version from `src/static/manifest.json`
111+
- `target`: Target browser
112+
- `version`: Build version from `package.json`

0 commit comments

Comments
 (0)