build: fix script

This commit is contained in:
himself65
2023-03-31 16:14:10 -05:00
parent 7299efe16a
commit 676a5793e2
3 changed files with 9 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ Please follow the Tauri [getting started guide](https://tauri.app/v1/guides/gett
After the environment is ready, start development build:
```sh
pnpm tauri dev
yarn tauri dev
```
## Development
@@ -22,8 +22,8 @@ We will provide its binary binding soon, to replace the git-submodule, before Oc
On this folder:
- `pnpm dev:app` will start a vite server
- `pnpm build:prerequisite` will link the Octobase and prepare affine dist html and tauri preload script, also will generate ts type from rs. You should run this before start your first development time.
- `yarn dev:app` will start a vite server
- `yarn build:prerequisite` will link the Octobase and prepare affine dist html and tauri preload script, also will generate ts type from rs. You should run this before start your first development time.
On project root folder:

View File

@@ -14,11 +14,11 @@ if (process.platform === 'win32') $.shell = 'pwsh';
* Build affine dist html
*/
cd(repoDirectory);
await $`pnpm i -r`;
await $`pnpm build`;
await $`yarn install`;
await $`yarn build`;
cd(affineSrcDirectory);
$.env.NEXT_BASE_PATH = '/affine-out';
await $`pnpm build`;
await $`pnpm export`;
await $`yarn build`;
await $`yarn export`;
await fs.remove(publicAffineOutDirectory);
await fs.move(affineSrcOutDirectory, publicAffineOutDirectory);

View File

@@ -1,7 +1,7 @@
{
"build": {
"beforeDevCommand": "pnpm dev:web",
"beforeBuildCommand": "pnpm build:preload && pnpm build:affine",
"beforeDevCommand": "yarn dev:web",
"beforeBuildCommand": "yarn build:preload && yarn build:affine",
"devPath": "http://localhost:8080",
"distDir": "../public",
"withGlobalTauri": false