Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
Cargo.lock
examples/web_app/target/*
.vscode
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ To run the tests one by one, run:

```bash
# Tests
$ docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
$ docker run -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
$ cargo test -- --test-threads=1
docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
docker run -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
cargo test -- --test-threads=1
```

Each PR should pass the tests to be accepted.
Expand All @@ -51,20 +51,20 @@ Each PR should pass the tests to be accepted.
Each PR should pass [`clippy`](https://github.com/rust-lang/rust-clippy) (the linter) to be accepted.

```bash
$ cargo clippy -- -D warnings
cargo clippy -- -D warnings
```

If you don't have `clippy` installed on your machine yet, run:

```bash
$ rustup update
$ rustup component add clippy
rustup update
rustup component add clippy
```

⚠️ Also, if you have installed `clippy` a long time ago, you might need to update it:

```bash
$ rustup update
rustup update
```

### Update the README
Expand All @@ -74,17 +74,17 @@ The README is generated. Please do not update manually the `README.md` file.
Instead, update the `README.tpl` and `src/lib.rs` files, and run:

```sh
$ sh scripts/update-readme.sh
sh scripts/update-readme.sh
```

Then, add the generated `README.md` file to your git commit.

You can check the current `README.md` is up-to-date by running:

```sh
$ sh scripts/check-readme.sh
sh scripts/check-readme.sh
# To see the diff
$ sh scripts/check-readme.sh --diff
sh scripts/check-readme.sh --diff
```

If it's not, the CI will fail on your PR.
Expand Down Expand Up @@ -151,7 +151,7 @@ with the right version.
You should run the following command after the changes applied to `lib.rs`:

```bash
$ sh scripts/update-readme.sh
sh scripts/update-readme.sh
```

Also, you might need to change the [code-samples file](/.code-samples.meilisearch.yaml) if the minor has been upgraded:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ There are many easy ways to [download and run a MeiliSearch instance](https://do

For example, if you use Docker:
```bash
$ docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
$ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
```

NB: you can also download MeiliSearch from **Homebrew** or **APT**.
Expand Down
8 changes: 4 additions & 4 deletions examples/web_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ The Rust source files are compiled into WebAssembly and so can be readable by th
If you only want to check if this example compiles, you can run:

```console
$ cargo build --example web_app
cargo build --example web_app
```

## Building

To build this example, you need [wasm-pack](https://github.com/rustwasm/wasm-pack).\
You can install `wasm-pack` with this command:
```console
$ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
```

```console
$ wasm-pack build examples/web_app/ --target=web --no-typescript
wasm-pack build examples/web_app/ --target=web --no-typescript
```

The compiled files will be stored in the `examples/web_app/pkg` folder.
Expand All @@ -33,7 +33,7 @@ The compiled files will be stored in the `examples/web_app/pkg` folder.
Theoretically, you could just open the `examples/web_app/pkg/index.html` file but due to browsers' security restrictions, you need a web server. For example:

```console
$ python3 -m http.server 8080
python3 -m http.server 8080
```

And then go to the `http://localhost:8080/` URL in your browser.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
//!
//! For example, if you use Docker:
//! ```bash
//! $ docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
//! $ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
//! docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
//! docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
//! ```
//!
//! NB: you can also download MeiliSearch from **Homebrew** or **APT**.
Expand Down