Browse Source

add icon asset and new capacitor step, and change "test-all" to "test:all"

app_id_fix
Trent Larson 6 days ago
parent
commit
b1056fc8dd
  1. 50
      BUILDING.md
  2. BIN
      assets/icon-only.png
  3. 3002
      package-lock.json
  4. 4
      package.json
  5. 2
      test-playwright/TESTING.md

50
BUILDING.md

@ -4,6 +4,8 @@ This guide explains how to build TimeSafari for different platforms.
## Prerequisites ## Prerequisites
For a quick dev environment setup, use [pkgx](https://pkgx.dev).
- Node.js (LTS version recommended) - Node.js (LTS version recommended)
- npm (comes with Node.js) - npm (comes with Node.js)
- Git - Git
@ -11,6 +13,17 @@ This guide explains how to build TimeSafari for different platforms.
- For Android builds: Android Studio with SDK installed - For Android builds: Android Studio with SDK installed
- For desktop builds: Additional build tools based on your OS - For desktop builds: Additional build tools based on your OS
## Forks
If you have forked this to make your own app, you'll want to customize the iOS & Android files. You can either edit existing ones, or you can remove the `ios` and `android` directories and regenerate them before the `npx cap sync` step in each setup.
```bash
npx cap add android
npx cap add ios
```
You'll also want to edit the deep link configuration.
## Initial Setup ## Initial Setup
1. Clone the repository: 1. Clone the repository:
@ -114,23 +127,20 @@ Prerequisites: macOS with Xcode installed
npx cap sync ios npx cap sync ios
``` ```
3. Open the project in Xcode: 3. Copy the assets:
```bash ```bash
npx cap open ios mkdir -p ios/App/App/Assets.xcassets/AppIcon.appiconset
npx capacitor-assets generate --ios
``` ```
4. Use Xcode to build and run on simulator or device. 3. Open the project in Xcode:
If you have forked this to make your own app, you'll want to customize the ios files:
```bash ```bash
rm -rf ios npx cap open ios
npx cap add ios
``` ```
... and then repeat the steps above. 4. Use Xcode to build and run on simulator or device.
### Android Build ### Android Build
@ -150,22 +160,19 @@ Prerequisites: Android Studio with SDK installed
npx cap sync android npx cap sync android
``` ```
3. Open the project in Android Studio: 3. Copy the assets
```bash ```bash
npx cap open android npx capacitor-assets generate --android
``` ```
3. Use Android Studio to build and run on emulator or device. 4. Open the project in Android Studio:
If you have forked this to make your own app, you'll want to customize the android files:
```bash ```bash
rm -rf android npx cap open android
npx cap add android
``` ```
... and then: repeat the steps above, and look below for the deep link configuration. 5. Use Android Studio to build and run on emulator or device.
## Building Android from the console ## Building Android from the console
@ -177,6 +184,13 @@ If you have forked this to make your own app, you'll want to customize the andro
npx cap run android npx cap run android
``` ```
... or, to create the `aab` file, `bundle` instead of `build`:
```bash
./gradlew bundle -Dlint.baselines.continue=true
```
## Configuring Android for deep links ## Configuring Android for deep links
You must add the following intent filter to the `android/app/src/main/AndroidManifest.xml` file: You must add the following intent filter to the `android/app/src/main/AndroidManifest.xml` file:
@ -332,7 +346,7 @@ The packaged application will be in `dist/TimeSafari`
Run all tests (requires XCode and Android Studio/device): Run all tests (requires XCode and Android Studio/device):
```bash ```bash
npm run test-all npm run test:all
``` ```
See [TESTING.md](test-playwright/TESTING.md) for more details. See [TESTING.md](test-playwright/TESTING.md) for more details.

BIN
assets/icon-only.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

3002
package-lock.json

File diff suppressed because it is too large

4
package.json

@ -12,8 +12,7 @@
"lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src", "lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src",
"lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src", "lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src",
"prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js", "prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js",
"test-local": "npx playwright test -c playwright.config-local.ts --trace on", "test:all": "npm run test:prerequisites && npm run build && npm run test:web && npm run test:mobile",
"test-all": "npm run test:prerequisites && npm run build && npm run test:web && npm run test:mobile",
"test:prerequisites": "node scripts/check-prerequisites.js", "test:prerequisites": "node scripts/check-prerequisites.js",
"test:web": "npx playwright test -c playwright.config-local.ts --trace on", "test:web": "npx playwright test -c playwright.config-local.ts --trace on",
"test:mobile": "npm run build:capacitor && npm run test:android && npm run test:ios", "test:mobile": "npm run build:capacitor && npm run test:android && npm run test:ios",
@ -118,6 +117,7 @@
"zod": "^3.24.2" "zod": "^3.24.2"
}, },
"devDependencies": { "devDependencies": {
"@capacitor/assets": "^3.0.5",
"@playwright/test": "^1.45.2", "@playwright/test": "^1.45.2",
"@types/dom-webcodecs": "^0.1.7", "@types/dom-webcodecs": "^0.1.7",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",

2
test-playwright/TESTING.md

@ -30,7 +30,7 @@ npx playwright install
To run all tests, make sure XCode is started and either Android Studio is started or an Android device is connected. To run all tests, make sure XCode is started and either Android Studio is started or an Android device is connected.
```bash ```bash
npm run test-all npm run test:all
``` ```
Run only web tests: Run only web tests:

Loading…
Cancel
Save