-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpubspec.yaml
More file actions
74 lines (67 loc) · 2.73 KB
/
Copy pathpubspec.yaml
File metadata and controls
74 lines (67 loc) · 2.73 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
name: easy_api_workplace
publish_to: none
environment:
sdk: ^3.9.0
dev_dependencies:
lints: ^6.1.0
melos: ^7.5.1
workspace:
- packages/easy_api_annotations
- packages/easy_api_generator
- example
melos:
scripts:
# Dependency management
bootstrap: "melos bootstrap"
clean: "melos clean"
get: "melos exec -- dart pub get"
upgrade: "melos exec -- dart pub upgrade"
outdated: "melos exec -- dart pub outdated"
# Shared dependency strategy — keep versions aligned across all publishable
# packages. Run `deps:check` before every release and `deps:upgrade` when
# pana warns about outdated shared constraints (e.g. analyzer).
deps:check: "melos exec --no-private -- dart pub outdated --no-dev-dependencies"
deps:upgrade: "melos exec --no-private -- dart pub upgrade --major-versions"
# Pana quality review — only run on publishable packages, never on example.
pana: "melos exec --no-private -- pana --no-warning ."
pana:annotations: "cd packages/easy_api_annotations && pana ."
pana:generator: "cd packages/easy_api_generator && pana ."
# Code quality
analyze: "melos exec -- dart analyze . --fatal-infos"
format: "melos exec -- dart format --set-exit-if-changed ."
lint: >
melos exec -- dart format . &&
melos exec -- dart analyze . --fatal-infos
fix: "melos exec -- dart fix --apply --dry-run"
fix:apply: "melos exec -- dart fix --apply"
# Testing
test: "melos exec --dir-exists=test -- dart test"
test:coverage: "melos exec --dir-exists=test -- dart test --coverage=coverage/"
test:report: "melos exec --dir-exists=test -- dart test --reporter=expanded"
# Build
build: "melos exec --depends-on=build_runner -- dart run build_runner build --delete-conflicting-outputs"
build:watch: "melos exec --depends-on=build_runner -- dart run build_runner build --delete-conflicting-outputs --watch"
build:clean: "melos exec --depends-on=build_runner -- dart run build_runner clean"
# Publishing
publish:dry-run: "melos exec --no-private -- dart pub publish --dry-run"
publish:check: >
melos exec --no-private -- dart pub publish --dry-run &&
echo "All packages ready for publishing"
publish:annotations: >
cd packages/easy_api_annotations &&
dart pub publish
publish:generator: >
cd packages/easy_api_generator &&
dart pub publish
publish:all: >
melos run publish:annotations &&
echo "easy_api_annotations published. Update easy_api_generator dependency to ^0.6.0 and run:" &&
echo "melos run publish:generator"
# Pre-commit / CI
precommit: >
melos run format &&
melos run analyze &&
melos run test
ci: >
melos run lint &&
melos run test