Skip to content

Commit 0e510b4

Browse files
committed
chore: add contributing document (#26)
1 parent 89d1a92 commit 0e510b4

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Indent and Align: To be determined
6666

6767
Font color and background color: to be determined
6868

69+
# Contribution
70+
71+
If you are interested in fixing issues and contributing directly to the code base, please see the document [How to Contribute](./contributing.md).
72+
6973
# Support me
7074

7175
If you like this project, you are welcome to buy me a cup of coffee! Your support will help me continue to improve and maintain this project.

README_ZH.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Cloud Document Converter 是一个浏览器扩展, 支持下载、复制飞书
6666

6767
- 字体颜色和背景色:待定
6868

69+
# Contribution
70+
71+
如果你有兴趣修复问题并直接为代码库做出贡献,请参阅文档 [如何贡献](./contributing.md)
72+
6973
# 支持我
7074

7175
如果你喜欢这个项目,欢迎你请我喝杯咖啡!你的支持将帮助我继续改进和维护这个项目。

contributing.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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

Comments
 (0)