-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathmelos.yaml
More file actions
151 lines (126 loc) · 4.32 KB
/
melos.yaml
File metadata and controls
151 lines (126 loc) · 4.32 KB
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
# yaml-language-server: $schema=./schemas/melos.yaml.schema.json
name: mix_workspace
packages:
- packages/*
- packages/mix/example
- packages/mix_generator/example
- examples
- packages/*/demo
command:
bootstrap:
environment:
sdk: ">=3.11.0 <4.0.0"
flutter: ">=3.41.0"
dependencies:
meta: ^1.15.0
dev_dependencies:
flutter_lints: ^6.0.0
dart_code_metrics_presets: ^2.24.0
build_runner: ^2.11.0
publish:
hooks:
pre: melos run gen:build
categories:
flutter_projects:
- packages/mix
- packages/mix/example
- packages/mix_lint_test
- packages/annotations
dart_projects:
- packages/mix_generator
- packages/mix_lint
scripts:
# ANALYSIS
analyze:
run: melos run analyze:dart && melos run analyze:dcm
description: Run all static analysis checks.
exec:
failFast: true
analyze:dart:
run: melos exec -c 4 -- dart analyze .
description: Run Dart static analysis checks.
analyze:dcm:
run: melos exec -c 4 -- dcm analyze . --fatal-style --fatal-warnings
description: Run DCM static analysis checks.
packageFilters:
dependsOn: "dart_code_metrics_presets"
lint:fix:all:
run: melos run lint:dart:fix && melos run lint:dcm:fix
description: Run all static analysis checks and apply fixes.
lint:dart:fix:
run: melos exec -- dart fix --apply .
description: Run Dart static analysis checks.
lint:dcm:fix:
run: melos exec -- dcm fix .
description: Run DCM static analysis checks.
packageFilters:
dependsOn: "dart_code_metrics_presets"
gen:watch:
run: melos exec --order-dependents -- dart run build_runner watch --delete-conflicting-outputs
description: Generate code for all packages
packageFilters:
dependsOn: "build_runner"
gen:build:
run: melos run gen:clean && melos run gen:build:flutter && melos run gen:build:dart
description: Generate code for all packages
gen:build:flutter:
run: melos exec --category=flutter_projects --order-dependents -- flutter pub run build_runner build --delete-conflicting-outputs
description: Generate code for Flutter packages
packageFilters:
dependsOn: "build_runner"
gen:build:dart:
run: melos exec --category=dart_projects --order-dependents -- dart run build_runner build --delete-conflicting-outputs
description: Generate code for Dart packages
packageFilters:
dependsOn: "build_runner"
gen:clean:
run: melos run gen:clean:flutter && melos run gen:clean:dart
description: Clean generated code for all packages
gen:clean:flutter:
run: melos exec --category=flutter_projects --order-dependents -- flutter pub run build_runner clean
description: Clean generated code for Flutter packages
packageFilters:
dependsOn: "build_runner"
gen:clean:dart:
run: melos exec --category=dart_projects --order-dependents -- dart run build_runner clean
description: Clean generated code for Dart packages
packageFilters:
dependsOn: "build_runner"
test:flutter:
run: melos exec --category=flutter_projects -- flutter test
description: Run flutter test
packageFilters:
dirExists: test
test:dart:
run: melos exec --category=dart_projects -- dart test
description: Run dart test
packageFilters:
dirExists: test
test:coverage:
run: melos exec --category=flutter_projects -- flutter test --coverage
description: Run flutter test with coverage
packageFilters:
dirExists: test
ci:
run: melos run test:flutter && melos run test:dart
description: Run flutter and dart tests
packageFilters:
dirExists: test
brb:
run: melos run gen:build
brbc:
run: melos run gen:clean
fix:
run: melos run lint:fix:all
custom_lint_analyze:
run: melos exec --depends-on="mix_lint" dart pub run custom_lint
exports:
run: melos exec --scope="mix" dart run ../../scripts/exports.dart .
description: Generate exports for the mix package
verify_version_pubspec_changelog:
run: ./scripts/verify_changelogs.sh packages
description: Verify that all packages have the same version
# API compatibility checking with dart_apitool
api-check:
run: dart scripts/api_check.dart
description: "Check API compatibility for mix packages (usage: melos run api-check -- [package] [version])"