build: fix script
This commit is contained in:
@@ -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:
|
After the environment is ready, start development build:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm tauri dev
|
yarn tauri dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
@@ -22,8 +22,8 @@ We will provide its binary binding soon, to replace the git-submodule, before Oc
|
|||||||
|
|
||||||
On this folder:
|
On this folder:
|
||||||
|
|
||||||
- `pnpm dev:app` will start a vite server
|
- `yarn 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 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:
|
On project root folder:
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ if (process.platform === 'win32') $.shell = 'pwsh';
|
|||||||
* Build affine dist html
|
* Build affine dist html
|
||||||
*/
|
*/
|
||||||
cd(repoDirectory);
|
cd(repoDirectory);
|
||||||
await $`pnpm i -r`;
|
await $`yarn install`;
|
||||||
await $`pnpm build`;
|
await $`yarn build`;
|
||||||
cd(affineSrcDirectory);
|
cd(affineSrcDirectory);
|
||||||
$.env.NEXT_BASE_PATH = '/affine-out';
|
$.env.NEXT_BASE_PATH = '/affine-out';
|
||||||
await $`pnpm build`;
|
await $`yarn build`;
|
||||||
await $`pnpm export`;
|
await $`yarn export`;
|
||||||
await fs.remove(publicAffineOutDirectory);
|
await fs.remove(publicAffineOutDirectory);
|
||||||
await fs.move(affineSrcOutDirectory, publicAffineOutDirectory);
|
await fs.move(affineSrcOutDirectory, publicAffineOutDirectory);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev:web",
|
"beforeDevCommand": "yarn dev:web",
|
||||||
"beforeBuildCommand": "pnpm build:preload && pnpm build:affine",
|
"beforeBuildCommand": "yarn build:preload && yarn build:affine",
|
||||||
"devPath": "http://localhost:8080",
|
"devPath": "http://localhost:8080",
|
||||||
"distDir": "../public",
|
"distDir": "../public",
|
||||||
"withGlobalTauri": false
|
"withGlobalTauri": false
|
||||||
|
|||||||
Reference in New Issue
Block a user