mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(ios): live reload script and docs (#8863)
This commit is contained in:
@@ -4,7 +4,17 @@ AFFiNE iOS app.
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
- yarn install
|
- `yarn install`
|
||||||
- BUILD_TYPE=canary PUBLIC_PATH="/" yarn workspace @affine/ios build
|
- `BUILD_TYPE=canary PUBLIC_PATH="/" yarn workspace @affine/ios build`
|
||||||
- yarn workspace @affine/ios cap sync
|
- `yarn workspace @affine/ios cap sync`
|
||||||
- yarn workspace @affine/ios cap open ios
|
- `yarn workspace @affine/ios cap open ios`
|
||||||
|
|
||||||
|
## Live Reload
|
||||||
|
|
||||||
|
> Capacitor doc: https://capacitorjs.com/docs/guides/live-reload#using-with-framework-clis
|
||||||
|
|
||||||
|
- `yarn install`
|
||||||
|
- `yarn dev`
|
||||||
|
- select `ios` for the "Distribution" option
|
||||||
|
- `yarn workspace @affine/ios sync:dev`
|
||||||
|
- `yarn workspace @affine/ios cap open ios`
|
||||||
|
|||||||
@@ -24,4 +24,12 @@ const config: CapacitorConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (process.env.CAP_SERVER_URL) {
|
||||||
|
Object.assign(config, {
|
||||||
|
server: {
|
||||||
|
url: process.env.CAP_SERVER_URL,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env DISTRIBUTION=ios yarn workspace @affine/cli bundle",
|
"build": "cross-env DISTRIBUTION=ios yarn workspace @affine/cli bundle",
|
||||||
"dev": "yarn workspace @affine/cli dev",
|
"dev": "yarn workspace @affine/cli dev",
|
||||||
|
"sync": "yarn cap sync",
|
||||||
|
"sync:dev": "CAP_SERVER_URL=http://localhost:8080 yarn cap sync",
|
||||||
"static-server": "cross-env DISTRIBUTION=ios yarn workspace @affine/cli dev --static"
|
"static-server": "cross-env DISTRIBUTION=ios yarn workspace @affine/cli dev --static"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user