forked from trent_larson/crowd-funder-for-time-pwa
add icon asset and new capacitor step, and change "test-all" to "test:all"
This commit is contained in:
58
BUILDING.md
58
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,6 +127,13 @@ Prerequisites: macOS with Xcode installed
|
||||
npx cap sync ios
|
||||
```
|
||||
|
||||
3. Copy the assets:
|
||||
|
||||
```bash
|
||||
mkdir -p ios/App/App/Assets.xcassets/AppIcon.appiconset
|
||||
npx capacitor-assets generate --ios
|
||||
```
|
||||
|
||||
3. Open the project in Xcode:
|
||||
|
||||
```bash
|
||||
@@ -122,16 +142,6 @@ Prerequisites: macOS with Xcode installed
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
rm -rf ios
|
||||
npx cap add ios
|
||||
```
|
||||
|
||||
... and then repeat the steps above.
|
||||
|
||||
|
||||
### Android Build
|
||||
|
||||
Prerequisites: Android Studio with SDK installed
|
||||
@@ -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 capacitor-assets generate --android
|
||||
```
|
||||
|
||||
4. Open the project in Android Studio:
|
||||
|
||||
```bash
|
||||
npx cap open 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:
|
||||
|
||||
```bash
|
||||
rm -rf 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
|
||||
|
||||
@@ -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
Normal file
BIN
assets/icon-only.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 190 KiB |
2480
package-lock.json
generated
2480
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user