mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-07 07:02:46 +02:00
Update development doc
This commit is contained in:
+39
-42
@@ -1,6 +1,13 @@
|
|||||||
### Developer Setup
|
# Developer Setup
|
||||||
|
|
||||||
#### Prerequisites
|
Yaak is a combined Node.js and Rust monorepo. It is a [Tauri](https://tauri.app) project, so
|
||||||
|
uses Rust and HTML/CSS/JS for the main application but there is also a plugin system powered
|
||||||
|
by a Node.js sidecar that communicates to the app over gRPC.
|
||||||
|
|
||||||
|
Because of the moving parts, there are a few setup steps required before development can
|
||||||
|
begin.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
Make sure you have the following tools installed:
|
Make sure you have the following tools installed:
|
||||||
|
|
||||||
@@ -8,60 +15,50 @@ Make sure you have the following tools installed:
|
|||||||
- [Rust](https://www.rust-lang.org/tools/install)
|
- [Rust](https://www.rust-lang.org/tools/install)
|
||||||
|
|
||||||
Check the installations with the following commands:
|
Check the installations with the following commands:
|
||||||
```bash
|
|
||||||
|
```shell
|
||||||
node -v
|
node -v
|
||||||
npm -v
|
npm -v
|
||||||
rustc --version
|
rustc --version
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Steps
|
Clone the [plugins repository](https://github.com/yaakapp/plugins) to your machine:
|
||||||
|
|
||||||
1. **Clone the Plugins Repository**
|
```shell
|
||||||
Clone the [plugins repository](https://github.com/yaakapp/plugins) to your local machine:
|
git clone https://github.com/yaakapp/plugins.git /path/to/your/plugins-directory
|
||||||
```bash
|
```
|
||||||
git clone https://github.com/yaakapp/plugins.git /path/to/your/plugins-directory
|
|
||||||
```
|
|
||||||
|
|
||||||
For example:
|
Install the NPM dependencies:
|
||||||
```bash
|
|
||||||
git clone https://github.com/yaakapp/plugins.git /Users/your-username/github/yaak/plugins
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Install Project Dependencies**
|
```shell
|
||||||
Go to your project's root directory and set the environment variable for the plugins directory:
|
npm install
|
||||||
```bash
|
```
|
||||||
cd /path/to/your/project
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Bootstrap the Project**
|
Run the `bootstrap` command to do some initial setup:
|
||||||
Run the bootstrap command to fetch external binaries and build local dependencies:
|
|
||||||
```bash
|
|
||||||
YAAK_PLUGINS_DIR="/path/to/your/plugins-directory" npm run bootstrap
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Run the Application in Development Mode**
|
```shell
|
||||||
After bootstrapping, start the app in development mode:
|
npm run bootstrap
|
||||||
```bash
|
```
|
||||||
npm run app-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
## Run the App
|
||||||
|
|
||||||
|
After bootstrapping, start the app in development mode:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
## SQLite Migrations
|
## SQLite Migrations
|
||||||
|
|
||||||
1. **Create a New Migration**
|
New migrations can be created from the `src-tauri/` directory:
|
||||||
From the `src-tauri/` directory, run:
|
|
||||||
```bash
|
|
||||||
cd src-tauri
|
|
||||||
sqlx migrate add migration-name
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Apply the Migrations**
|
```shell
|
||||||
Run the app to apply the migrations. If needed, run:
|
cd src-tauri
|
||||||
```bash
|
sqlx migrate add migration-name
|
||||||
cargo clean
|
```
|
||||||
npm run app-dev
|
|
||||||
```
|
Run the app to apply the migrations.
|
||||||
|
|
||||||
|
If nothing happens, try `cargo clean` and run the app again.
|
||||||
|
|
||||||
_Note: Development builds use a separate database location from production builds._
|
_Note: Development builds use a separate database location from production builds._
|
||||||
Reference in New Issue
Block a user