Skip to content

Commit

Permalink
docs: opt contributiong.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kiner-tang committed Jun 30, 2024
1 parent 25fa59f commit d1a7e2e
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@

## Getting Started

Clone.
### Environment

First of all, you need to install the following tools:

- [Rust](https://www.rust-lang.org/tools/install)
- [Node.js](https://nodejs.org/en/download/)
- [pnpm](https://pnpm.io/installation)

Then, you can clone the repository and install the dependencies:

```bash
$ git clone git@github.com:umijs/mako.git
$ cd mako
```

Install tools.
Install dependencies.

```bash
$ cargo install just
$ cargo install cargo-binstall
```

Compile.
### Development

```bash
$ cargo build
Expand All @@ -29,7 +37,7 @@ Build js packages (include packages/mako).
$ pnpm build
```

Run.
Run mako with examples.

```bash
$ cargo run --bin mako examples/normal
Expand All @@ -44,15 +52,15 @@ $ RUST_LOG=mako::parse=debug,info cargo run --bin mako examples/normal

## Advanced Tasks

Before you push.
Before you push your code, you should run the following commands to make sure everything is ok.

```bash
$ just ready
# without e2e
$ just ready-lite
```

Test.
Run tests.

```bash
$ pnpm playwright install # only need to run before the first time you run "jest test"
Expand All @@ -63,26 +71,26 @@ $ cargo nextest run transformers::transform_try_resolve::tests
$ cargo insta review
```

Coverage.
Run Coverage.

```bash
$ cargo codecov
$ cargo codecov --html && open target/llvm-cov/html/index.html
```

Format.
Run fmt to format code.

```bash
$ just fmt
```

Lint.
Run lint to check code style.

```bash
$ just lint
```

Upgrade dependencies.
Upgrade dependencies if you need.

```bash
$ cargo upgrade
Expand Down

0 comments on commit d1a7e2e

Please sign in to comment.