Wrap the PWA in a thin native iOS shell (Capacitor 8):
- capacitor.config.json (webDir dist, appId uk.timevans.thedirector,
iOS safe-area contentInset + theme background).
- @capacitor/{core,cli,ios} as devDependencies (web app keeps zero
runtime deps); ios:add / ios:sync / ios:open / ios npm scripts.
- main.js skips service-worker registration under Capacitor
(window.Capacitor.isNativePlatform) — assets are already local.
- iOS <meta> hints in index.html; .gitignore for native build output.
- docs/native-ipad-wrapper.md: full Xcode + CocoaPods build guide,
incl. the keep-awake plugin note for the wake toggle in WKWebView.
The iOS project generation/build (npx cap add ios → Xcode) needs a Mac
with full Xcode + CocoaPods, which this env lacks; it is documented for
the user to run. tests/tools/capacitor-config.test.js guards the config.
211 tests pass; build clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
674 B
JSON
27 lines
674 B
JSON
{
|
|
"name": "gm-director",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"gen:scenario": "node tools/md-to-scenario.mjs",
|
|
"ios:add": "npm run build && cap add ios",
|
|
"ios:sync": "npm run build && cap sync ios",
|
|
"ios:open": "cap open ios",
|
|
"ios": "npm run build && cap sync ios && cap open ios"
|
|
},
|
|
"devDependencies": {
|
|
"@capacitor/cli": "^8.4.2",
|
|
"@capacitor/core": "^8.4.2",
|
|
"@capacitor/ios": "^8.4.2",
|
|
"jsdom": "^24.0.0",
|
|
"vite": "^5.2.0",
|
|
"vitest": "^1.6.0"
|
|
}
|
|
}
|