mirror of
https://github.com/DungeonPaper/dungeon-paper-app.git
synced 2026-05-17 17:58:11 +00:00
docs: update readme + add script descriptions
This commit is contained in:
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
gen/
|
||||
15
.prettierrc
Normal file
15
.prettierrc
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.md",
|
||||
"options": {
|
||||
"printWidth": 100,
|
||||
"proseWrap": "always"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -70,7 +70,8 @@ don't hesitate to open an appropriate issue and I will do my best to reply promp
|
||||
flutterfire configure
|
||||
```
|
||||
|
||||
1. Add your firebase secrets, put this template in `lib/core/utils/secrets.dart` and update the values
|
||||
1. Add your firebase secrets, put this template in `lib/core/utils/secrets.dart` and update the
|
||||
values
|
||||
|
||||
```dart
|
||||
part of 'secrets_base.dart';
|
||||
@@ -81,6 +82,11 @@ don't hesitate to open an appropriate issue and I will do my best to reply promp
|
||||
}
|
||||
```
|
||||
|
||||
Sentry DSN can remain empty to skip error reporting
|
||||
|
||||
1. To run build scripts, install [script_runner](https://pub.dev/packages/script_runner) and use
|
||||
`scr -h` to see all available commands
|
||||
|
||||
As mentioned above, Firebase secret keys must be your own, and so are the databases and services
|
||||
related to them. This project uses Firebase auth, Firestore, and Crashlytics.
|
||||
|
||||
|
||||
82
pubspec.yaml
82
pubspec.yaml
@@ -30,7 +30,7 @@ dependencies:
|
||||
cloud_firestore: ^4.5.2
|
||||
cupertino_icons: ^1.0.2
|
||||
# dungeon_world_data:
|
||||
# path: ../dungeon_world_data
|
||||
# path: ../dungeon_world_data
|
||||
dungeon_world_data: ^3.0.1
|
||||
dynamic_themes: ^1.1.0
|
||||
email_validator: ^2.0.1
|
||||
@@ -213,15 +213,25 @@ icons_launcher:
|
||||
script_runner:
|
||||
shell: /bin/zsh
|
||||
scripts:
|
||||
- name: get-version
|
||||
- name: version
|
||||
cmd: dart scripts/get_version.dart
|
||||
suppress_header_output: true
|
||||
- bump: dart lib/core/task_runner/deploy.dart --bump pre
|
||||
description: Get version number
|
||||
- name: bump
|
||||
cmd: dart lib/core/task_runner/deploy.dart --bump pre
|
||||
description: Bump version number
|
||||
# Android
|
||||
- build:android:apk: flutter build apk
|
||||
- build:android:bundle: flutter build appbundle
|
||||
- build:android:all: build:android:apk && build:android:bundle
|
||||
- name: build:android:apk
|
||||
cmd: flutter build apk
|
||||
description: Build Android APK only
|
||||
- name: build:android:bundle
|
||||
cmd: flutter build appbundle
|
||||
description: Build Android unified bundle (for Play Store release)
|
||||
- name: build:android:all
|
||||
cmd: build:android:apk && build:android:bundle
|
||||
description: Build Android unified bundle + standalone APK
|
||||
- name: push:android:apk
|
||||
description: Push APK to ADB-connected device
|
||||
suppress_header_output: true
|
||||
cmd: |-
|
||||
name=$(dart run btool get packageName)
|
||||
@@ -230,22 +240,52 @@ script_runner:
|
||||
target="/sdcard/Download/$name-$version.apk"
|
||||
echo "adb push $source $target"
|
||||
adb push $source $target
|
||||
- install: adb install -r build/app/outputs/flutter-apk/app-release.apk
|
||||
- name: install
|
||||
cmd: adb install -r build/app/outputs/flutter-apk/app-release.apk
|
||||
description: Install APK on Android (does not build)
|
||||
# iOS
|
||||
- build:ios:app: flutter build ios
|
||||
- build:ios:bundle: flutter build ipa
|
||||
- build:ios:all: build:ios:app && build:ios:bundle
|
||||
- name: build:ios:app
|
||||
cmd: flutter build ios
|
||||
description: Build iOS APP file
|
||||
- name: build:ios:bundle
|
||||
cmd: flutter build ipa
|
||||
description: Build iOS IPA file
|
||||
- name: build:ios:all
|
||||
cmd: build:ios:app && build:ios:bundle
|
||||
description: Build iOS IPA + APP
|
||||
# macOS
|
||||
- build:macos:app: flutter build macos
|
||||
- build:macos:all: build:macos:app
|
||||
- name: build:macos:app
|
||||
cmd: flutter build macos
|
||||
description: Build macOS App
|
||||
- name: build:macos:all
|
||||
cmd: build:macos:app
|
||||
description: 'Alias for: Build macOS App'
|
||||
# Web
|
||||
- build:web:app: flutter build web
|
||||
- build:web:all: build:web:app
|
||||
- name: build:web:app
|
||||
cmd: flutter build web
|
||||
description: Build Web app
|
||||
- name: build:web:all
|
||||
cmd: build:web:app
|
||||
description: 'Alias for: Build Web app'
|
||||
# All
|
||||
- build:all: build:android:all && build:ios:all && build:macos:all && build:web:all
|
||||
- to-android: build:android:apk && push:android:apk && install:android:apk
|
||||
- gen:icons: flutter pub run icons_launcher:create
|
||||
- format: dart format --line-length 120
|
||||
- intl:generate_from_arb: dart run intl_generator:generate_from_arb --no-use-deferred-loading --output-dir=lib/generated/intl lib/generated/l10n.dart lib/l10n/intl_en.arb
|
||||
- intl:extract_to_arb: dart run intl_generator:extract_to_arb --output-dir=lib/l10n lib/generated/l10n.dart
|
||||
- intl: intl:generate_from_arb && intl:extract_to_arb
|
||||
- name: build:all
|
||||
cmd: build:android:all && build:ios:all && build:macos:all && build:web:all
|
||||
description: Build for all platforms
|
||||
- name: to-android
|
||||
cmd: build:android:apk && push:android:apk && install:android:apk
|
||||
description: Build, push and install APK to ADB connected device
|
||||
- name: gen:icons
|
||||
cmd: flutter pub run icons_launcher:create
|
||||
description: Generate launcher icons
|
||||
- name: format
|
||||
cmd: dart format --line-length 120
|
||||
description: Format all Dart files
|
||||
- name: intl:generate_from_arb
|
||||
cmd: dart run intl_generator:generate_from_arb --no-use-deferred-loading --output-dir=lib/generated/intl lib/generated/l10n.dart lib/l10n/intl_en.arb
|
||||
description: Generate localization files from ARB file
|
||||
- name: intl:extract_to_arb
|
||||
cmd: dart run intl_generator:extract_to_arb --output-dir=lib/l10n lib/generated/l10n.dart
|
||||
description: Extract localization files to ARB
|
||||
- name: intl
|
||||
cmd: intl:generate_from_arb && intl:extract_to_arb
|
||||
description: Extract & Generate ARB files
|
||||
|
||||
Reference in New Issue
Block a user