-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmelos.yaml
92 lines (76 loc) · 2.79 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
name: erb_flutter_boilerplate
packages:
- .
- packages/*
command:
bootstrap:
# It seems so that running "pub get" in parallel has some issues (like
# https://github.com/dart-lang/pub/issues/3404). Disabling this feature
# makes the CI much more stable.
runPubGetInParallel: false
hooks:
pre: echo `bootstrap command is running...`
# Generate environment files which should not be committed to the repository.
# Instead, they are generated during the CI process before checking
# if the rest of the package's code generation is up to date.
post: dart run husky install
# See https://github.com/firebase/flutterfire/blob/master/melos.yaml for more examples
scripts:
lint:
run: melos run analyze && melos run format
description: Run all static analysis checks.
analyze:
# We are setting the concurrency to 1 because a higher concurrency can crash
# the analysis server on low performance machines (like GitHub Actions).
run: |
melos exec -c 1 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
format:
run: melos exec dart format . --set-exit-if-changed
description: Run `flutter format` checks for all packages.
format:fix:
run: melos exec dart format . --fix
description: Run `flutter format` for all packages.
generate:
run: |
melos run generate:pkg && melos run generate:i18n
description: Run generate in all packages.
generate:pkg:
run: |
melos exec -c 1 --depends-on=build_runner \
"dart run build_runner build --delete-conflicting-outputs"
description: run `build_runner` to generate code in all packages
generate:i18n:
run: dart run slang
description: Run `dart run slang` generate dart file
packageFilters:
dirExists:
- lib/i18n
watch:i18n:
run: dart run slang watch
exec:
failFast: true
description: Run `dart run slang watch` auto Rebuild generate dart file
packageFilters:
dirExists:
- lib/i18n
watch:pkg:
run: dart run build_runner watch
exec:
# concurrency: 1
failFast: true
description: Run `build_runner watch` in the selected package. If all is selected, the command will only run in the first package.
packageFilters:
dependsOn: build_runner
noDependsOn: envied
pub-outdated:
run: melos exec dart pub outdated
description: Run `dart pub outdated` for all packages.
pub-upgrade:
# May fails until https://github.com/dart-lang/pub/pull/3920 is released
run: melos exec dart pub upgrade --major-versions
description: Run `dart pub upgrade --major-versions` for all packages.
release: melos publish --yes --no-dry-run