chore: add monorepo tools (#9196)

This commit is contained in:
liuyi
2024-12-24 15:29:48 +08:00
committed by GitHub
parent e3a8b63e38
commit 2443935830
116 changed files with 9390 additions and 1466 deletions

View File

@@ -87,13 +87,13 @@ This could take a while if you build it for the first time.
Note: use `strip` from system instead of `binutils` if you are running MacOS. [see problem here](https://github.com/toeverything/AFFiNE/discussions/2840)
```
yarn workspace @affine/native build
yarn affine @affine/native build
```
### Build Server Dependencies
```sh
yarn workspace @affine/server-native build
yarn affine @affine/server-native build
```
## Testing

View File

@@ -46,7 +46,7 @@ Please refer to `Build Native Dependencies` section in [BUILDING.md](./BUILDING.
On Mac & Linux
```shell
BUILD_TYPE=canary yarn workspace @affine/electron generate-assets
BUILD_TYPE=canary yarn affine @affine/electron generate-assets
```
On Windows (powershell)
@@ -90,7 +90,7 @@ yarn install
Note: you need to comment out `osxSign` and `osxNotarize` in `forge.config.js` to skip signing and notarizing the app.
```shell
BUILD_TYPE=canary SKIP_WEB_BUILD=1 HOIST_NODE_MODULES=1 yarn workspace @affine/electron make
BUILD_TYPE=canary SKIP_WEB_BUILD=1 HOIST_NODE_MODULES=1 yarn affine @affine/electron make
```
#### Windows
@@ -101,9 +101,9 @@ Making the windows installer is a bit different. Right now we provide two instal
$env:BUILD_TYPE="canary"
$env:SKIP_WEB_BUILD=1
$env:HOIST_NODE_MODULES=1
yarn workspace @affine/electron package
yarn workspace @affine/electron make-squirrel
yarn workspace @affine/electron make-nsis
yarn affine @affine/electron package
yarn affine @affine/electron make-squirrel
yarn affine @affine/electron make-nsis
```
Once the build is complete, you can find the paths to the binaries in the terminal output.

View File

@@ -18,7 +18,7 @@ docker compose -f ./.docker/dev/compose.yml up -d
```sh
# build native
yarn workspace @affine/server-native build
yarn affine @affine/server-native build
```
## Prepare dev environment