Browse Source

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

master
Trent Larson 3 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
For a quick dev environment setup, use [pkgx](https://pkgx.dev).
- Node.js (LTS version recommended)
- npm (comes with Node.js)
- Git
@ -11,6 +13,17 @@ This guide explains how to build TimeSafari for different platforms.
- For Android builds: Android Studio with SDK installed
- 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
1. Clone the repository:
@ -114,23 +127,20 @@ Prerequisites: macOS with Xcode installed
npx cap sync ios
```
3. Open the project in Xcode:
3. Copy the assets:
```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.
If you have forked this to make your own app, you'll want to customize the ios files:
3. Open the project in Xcode:
```bash
rm -rf ios
npx cap add ios
npx cap open ios
```
... and then repeat the steps above.
4. Use Xcode to build and run on simulator or device.
### Android Build
@ -150,22 +160,19 @@ Prerequisites: Android Studio with SDK installed
npx cap sync android
```
3. Open the project in Android Studio:
3. Copy the assets
```bash
npx cap open android
npx capacitor-assets generate --android
```
3. Use Android Studio to build and run on emulator or device.
If you have forked this to make your own app, you'll want to customize the android files:
4. Open the project in Android Studio:
```bash
rm -rf android
npx cap add android
npx cap open 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
@ -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
```
... or, to create the `aab` file, `bundle` instead of `build`:
```bash
./gradlew bundle -Dlint.baselines.continue=true
```
## Configuring Android for deep links
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):
```bash
npm run test-all
npm run test:all
```
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-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",
"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: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",
@ -118,6 +117,7 @@
"zod": "^3.24.2"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
"@playwright/test": "^1.45.2",
"@types/dom-webcodecs": "^0.1.7",
"@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.
```bash
npm run test-all
npm run test:all
```
Run only web tests:

Loading…
Cancel
Save