|
| 1 | +# Contributing to Cloud Document Converter |
| 2 | + |
| 3 | +There are many ways to contribute to the Cloud Document Converter project: logging bugs, submitting pull requests, reporting issues, and creating suggestions. |
| 4 | + |
| 5 | +After cloning and building the repo, check out the [issues list](https://github.com/whale4113/cloud-document-converter/issues). Issues labeled [`help wanted`](https://github.com/whale4113/cloud-document-converter/issues?q=is:issue+is:open+label:%22help+wanted%22+) are good issues to submit a PR for. Issues labeled [`good first issue`](https://github.com/whale4113/cloud-document-converter/issues?q=is:issue+is:open+label:%22good+first+issue%22+) are great candidates to pick up if you are in the code for the first time. If you are contributing significant changes, or if the issue is already assigned to a specific month milestone, please discuss with the assignee of the issue first before starting to work on the issue. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +In order to download necessary tools, clone the repository, and install dependencies via pnpm, you need network access. |
| 10 | + |
| 11 | +You'll need the following tools: |
| 12 | + |
| 13 | +- [Git](https://git-scm.com/) |
| 14 | +- [Node.JS](https://nodejs.org/en/download/prebuilt-binaries), x64 or ARM64, version >=20.x |
| 15 | +- [Bun](https://bun.sh/). optionally, if you do not choose to build the firefox extension |
| 16 | + |
| 17 | +### Development container |
| 18 | + |
| 19 | +Alternatively, you can avoid local dependency installation as this repository includes a **Visual Studio Code [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)** development container. |
| 20 | + |
| 21 | +For Dev Containers, use the **Dev Containers: Clone Repository in Container Volume** command which creates a Docker volume for better disk I/O on macOS and Windows. |
| 22 | + |
| 23 | +## Development Setup |
| 24 | + |
| 25 | +You will need Node.js with minimum version as specified in the .node-version file, and PNPM with minimum version as specified in the "packageManager" field in package.json. |
| 26 | + |
| 27 | +After cloning the repo, run: |
| 28 | + |
| 29 | +```shell |
| 30 | +$ pnpm i # install the dependencies of the project |
| 31 | +``` |
| 32 | + |
| 33 | +## Build and Run |
| 34 | + |
| 35 | +### Build |
| 36 | + |
| 37 | +```shell |
| 38 | +cd apps/chrome-extension |
| 39 | +npx turbo run build # build chrome extension |
| 40 | + |
| 41 | +# pnpm run build:firefox # build firefox extension |
| 42 | +``` |
| 43 | + |
| 44 | +### Run |
| 45 | + |
| 46 | +[web-ext](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/#test-and-degug-an-extention) is a command-line tool designed to speed up and simplify development. |
| 47 | + |
| 48 | +```shell |
| 49 | +cd apps/chrome-extension |
| 50 | +npx web-ext run --source-dir dist --target chromium # |
| 51 | + |
| 52 | +# npx web-ext run --source-dir dist-firefox # |
| 53 | +``` |
| 54 | + |
| 55 | +After making changes to the source files, you need to rebuild the project manually。The web-ext run command watches our dist files and tells Chromium/Firefox to reload the extension after you rebuild the project. |
0 commit comments