chore(stage-pocket): add shortcut pnpm script dev:ios
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
"preview": "vite preview",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"dev:web": "vite",
|
||||
"dev:ios": "VITE_CAP_SYNC_IOS_AFTER_BUILD=1 vite build --watch",
|
||||
"open:ios": "vite build && cap sync ios && cap open ios"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
declare namespace NodeJS {
|
||||
export interface ProcessEnv {
|
||||
VITE_SKIP_MKCERT?: string
|
||||
VITE_CAP_SYNC_IOS_AFTER_BUILD?: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/// <reference types="./vite.config-env.d.ts" />
|
||||
|
||||
import type { PluginOption } from 'vite'
|
||||
|
||||
import process from 'node:process'
|
||||
|
||||
import { execSync } from 'node:child_process'
|
||||
import { join, resolve } from 'node:path'
|
||||
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
@@ -142,6 +145,20 @@ export default defineConfig({
|
||||
Download('https://dist.ayaka.moe/vrm-models/VRoid-Hub/AvatarSample-A/AvatarSample_A.vrm', 'AvatarSample_A.vrm', 'vrm/models/AvatarSample-A', { parentDir: stageUIAssetsRoot, cacheDir: sharedCacheDir }),
|
||||
Download('https://dist.ayaka.moe/vrm-models/VRoid-Hub/AvatarSample-B/AvatarSample_B.vrm', 'AvatarSample_B.vrm', 'vrm/models/AvatarSample-B', { parentDir: stageUIAssetsRoot, cacheDir: sharedCacheDir }),
|
||||
|
||||
.../^1|true|yes$/i.test(process.env.VITE_CAP_SYNC_IOS_AFTER_BUILD ?? '')
|
||||
? [{
|
||||
name: 'proj-airi:capacitor-sync',
|
||||
closeBundle: {
|
||||
sequential: true,
|
||||
handler() {
|
||||
if (this.meta.watchMode) {
|
||||
execSync('cap sync ios', { stdio: 'inherit' })
|
||||
}
|
||||
},
|
||||
},
|
||||
} as PluginOption]
|
||||
: [],
|
||||
|
||||
{
|
||||
name: 'proj-airi:defines',
|
||||
config(ctx) {
|
||||
|
||||
Reference in New Issue
Block a user