forked from hpi-studyu/studyu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
178 lines (155 loc) · 4.92 KB
/
melos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: studyu-packages
repository: https://github.com/hpi-studyu/studyu
packages:
- app
- designer_v2
- core
- flutter_common
command:
clean:
hooks:
# Clean things very deeply, can be used to establish "pristine checkout" status
pre: >
git clean -x -d -f -q || true
# Additional cleanup lifecycle script, executed when `melos clean` is ran.
post: >
melos exec --flutter --concurrency=3 -- "flutter clean"
scripts:
analyze:
run: |
melos exec -c 6 -- \
"flutter analyze --fatal-infos ."
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
fix:
run: |
melos exec -c 6 -- \
"dart fix --apply"
description: Fix auto-fixable lint errors
# todo exclude *.g.dart files in a platform agnostic way
# dart format sadly does not support this yet: https://github.com/dart-lang/dart_style/issues/864
format:
run: |
melos exec -c 6 -- \
"dart format -l 120 ."
description: Format all code and markdown files
format:ci:
run: |
melos exec -c 6 -- \
"find . -type f -name '*.dart' ! -name '*.g.dart' ! -path '**/.dart_tool/**' | tr '\n' ' ' | xargs dart format -l 120 --set-exit-if-changed"
description: Format all code without generated files
outdated:
run: |
melos exec -c 6 --fail-fast -- \
"dart pub outdated"
description: Check all outdated dependencies
upgrade:
run: |
dart pub upgrade
melos exec -c 6 --fail-fast -- \
"dart pub upgrade" && melos bootstrap
description: Check all outdated dependencies
test:
run: |
melos exec -c 6 --fail-fast -- \
"flutter test"
description: Run `flutter test` for a specific package.
packageFilters:
dir-exists: test
generate:
run: |
melos exec -c 1 --fail-fast -- \
"dart run build_runner build --delete-conflicting-outputs"
description: Generate files with build_runner
packageFilters:
scope: studyu_core
dev:designer:
run: |
melos exec -c 1 -- \
"flutter run -d chrome --web-port 3001 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_designer_v2
description: Runs designer in Chrome on port 3001 with local env for local development
dev:app:
run: |
melos exec -c 1 -- \
"flutter run --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_app
description: Runs app with local env for local development
build:android:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build apk --multidex"
description: Build app for Android.
packageFilters:
dir-exists: android
build:ios:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build ipa --no-codesign"
description: Build app for iOS.
packageFilters:
dir-exists: ios
build:web:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web"
description: Build app for Web.
packageFilters:
scope: [studyu_app, studyu_designer_v2]
dir-exists: web
build:web:app:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web"
description: Build app for Web.
packageFilters:
scope: studyu_app
build:web:designer_v2:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web"
description: Build designer_v2 for Web.
packageFilters:
scope: studyu_designer_v2
build:web:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --dart-define=STUDYU_ENV=.env.dev"
description: Build web dev.
packageFilters:
scope: [studyu_app, studyu_designer_v2]
dir-exists: web
build:web:app:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --dart-define=STUDYU_ENV=.env.dev"
description: Build web app dev.
packageFilters:
scope: studyu_app
dir-exists: web
build:web:designer_v2:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --dart-define=STUDYU_ENV=.env.dev"
description: Build web designer_v2 dev.
packageFilters:
scope: studyu_designer_v2
dir-exists: web
# Used to test Designer "Try out study" feature, where the designer opens the App using the user auth token from designer
app:web:local:
run: |
melos exec -c 1 -- \
"flutter run lib/main.dart -d chrome --web-port 8080 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_app
description: Runs app in chrome on port 8080 with local env
designer_v2:web:local:
run: |
melos exec -c 1 -- \
"flutter run lib/main.dart -d chrome --web-port 8081 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_designer_v2
description: Runs designer in chrome on port 8081 with local env