mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
docs: Add guidelines for windows development (#250)
This commit is contained in:
parent
c9e78c837b
commit
082e35668a
67
CONTRIBUTING.md
Normal file
67
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
# CONTRIBUTING
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to Clash Verge Rev! This document provides guidelines and instructions to help you set up your development environment and start contributing.
|
||||||
|
|
||||||
|
## Development Setup
|
||||||
|
|
||||||
|
Before you start contributing to the project, you need to set up your development environment. Here are the steps you need to follow:
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
1. **Install Rust and Node.js**: Our project requires both Rust and Node.js. Please follow the instructions provided [here](https://tauri.app/v1/guides/getting-started/prerequisites) to install them on your system.
|
||||||
|
|
||||||
|
### Setup for Windows Users
|
||||||
|
|
||||||
|
If you're a Windows user, you may need to perform some additional steps:
|
||||||
|
|
||||||
|
- Make sure to add Rust and Node.js to your system's PATH. This is usually done during the installation process, but you can verify and manually add them if necessary.
|
||||||
|
- The gnu `patch` tool should be installed
|
||||||
|
|
||||||
|
### Install Node.js Packages
|
||||||
|
|
||||||
|
After installing Rust and Node.js, install the necessary Node.js packages:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pnpm i
|
||||||
|
```
|
||||||
|
|
||||||
|
### Download the Clash Binary
|
||||||
|
|
||||||
|
You have two options for downloading the clash binary:
|
||||||
|
|
||||||
|
- Automatically download it via the provided script:
|
||||||
|
```shell
|
||||||
|
pnpm run check
|
||||||
|
# Use '--force' to force update to the latest version
|
||||||
|
# pnpm run check --force
|
||||||
|
```
|
||||||
|
- Manually download it from the [Clash Meta release](https://github.com/MetaCubeX/Clash.Meta/releases). After downloading, rename the binary according to the [Tauri configuration](https://tauri.app/v1/api/config#bundleconfig.externalbin).
|
||||||
|
|
||||||
|
### Run the Development Server
|
||||||
|
|
||||||
|
To run the development server, use the following command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pnpm dev
|
||||||
|
# If an app instance already exists, use a different command
|
||||||
|
pnpm dev:diff
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build the Project
|
||||||
|
|
||||||
|
If you want to build the project, use:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pnpm build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing Your Changes
|
||||||
|
|
||||||
|
Once you have made your changes:
|
||||||
|
|
||||||
|
1. Fork the repository.
|
||||||
|
2. Create a new branch for your feature or bug fix.
|
||||||
|
3. Commit your changes with clear and concise commit messages.
|
||||||
|
4. Push your branch to your fork and submit a pull request to our repository.
|
||||||
|
|
||||||
|
We appreciate your contributions and look forward to your active participation in our project!
|
26
README.md
26
README.md
|
@ -66,34 +66,14 @@ open the terminal and run `sudo xattr -r -d com.apple.quarantine /Applications/C
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
You should install Rust and Nodejs, see [here](https://tauri.app/v1/guides/getting-started/prerequisites) for more details. Then install Nodejs packages.
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
|
||||||
|
|
||||||
|
To run the development server, execute the following commands after all prerequisites for **Tauri** are installed:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pnpm i
|
pnpm i
|
||||||
```
|
|
||||||
|
|
||||||
Then download the clash binary... Or you can download it from [clash meta release](https://github.com/MetaCubeX/Clash.Meta/releases) and rename it according to [tauri config](https://tauri.app/v1/api/config#bundleconfig.externalbin).
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# force update to latest version
|
|
||||||
# pnpm run check --force
|
|
||||||
|
|
||||||
pnpm run check
|
pnpm run check
|
||||||
```
|
|
||||||
|
|
||||||
Then run
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pnpm dev
|
pnpm dev
|
||||||
|
|
||||||
# run it in another way if app instance exists
|
|
||||||
pnpm dev:diff
|
|
||||||
```
|
|
||||||
|
|
||||||
Or you can build it
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pnpm build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Todos
|
## Todos
|
||||||
|
|
Loading…
Reference in New Issue
Block a user