-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmelos.yaml
114 lines (97 loc) · 3.31 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
name: rapid
packages:
- packages/rapid_cli
command:
bootstrap:
# https://github.com/dart-lang/pub/issues/3404)
runPubGetInParallel: false
hooks:
post: melos run setup-pre-commit-hook
clean:
hooks:
post: |
rm -r node_modules && \
rm commitlint.config.js && \
rm package-lock.json && \
rm package.json && \
melos exec -c 3 -- "flutter clean"
ide:
intellij: false
scripts:
setup-pre-commit-hook:
run: |
npm install --save-dev @commitlint/{cli,config-conventional} && \
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js && \
npm install husky --save-dev
npx husky install
description: |
Set up pre commit hook to ensure Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/) via commitlint (https://www.npmjs.com/package/commitlint).
- Requires `node` (can be installed via Brew on macOS).
format:
run: |
dart format packages/rapid_cli/bin --fix && \
dart format packages/rapid_cli/lib --fix && \
dart format packages/rapid_cli/test --fix
description: Format the project
analyze:
run: |
flutter analyze packages/rapid_cli/bin && \
flutter analyze packages/rapid_cli/lib && \
flutter analyze packages/rapid_cli/test
description: Analyze the project
fix:
exec: dart fix --apply
description: Apply code fixes
fix:dry:
exec: dart fix --dry-run
description: Code fixes in dry mode
dev:activate:
exec: dart pub global activate --source path .
description: Locally activate rapid_cli for development.
packageFilters:
scope: "rapid_cli"
dev:create:none:
run: |
melos dev:activate && \
rm -r -f packages/rapid_cli/tmp && \
rapid create foo_bar -o packages/rapid_cli/tmp
description: Run rapid create for tinkering with no platform.
dev:create:all:
run: |
melos dev:activate && \
rm -r -f packages/rapid_cli/tmp && \
rapid create foo_bar -o packages/rapid_cli/tmp --all
description: Run rapid create for tinkering with all platforms.
git:dev:into:main:
run: |
git merge --ff-only origin/dev && \
git push origin main
description: Merge dev branch into main branch (This must be run from main branch)
git:reset:dev:
run: |
git reset --hard origin/main && \
git push --force origin dev
description: Reset dev to main branch. (This must be run from dev branch)
github:actions:local:
run: act -W ./.github/workflows/rapid_cli.yaml -P macos-latest=-self-hosted
description: Runs GitHub Actions locally (requires macOS and `act` which can be installed via `brew install act`)
test:
exec: flutter test test/src
description: Run `flutter test test/src` in a package.
packageFilters:
dirExists:
- test/src
test:coverage:
exec: flutter test test/src --coverage
description: Run `flutter test test/src --coverage` in a package.
packageFilters:
dirExists:
- test/src
coverage:html:
exec: genhtml coverage/lcov.info -o coverage/html
description: |
Generate a html-coverage report for a package.
- Requires `lcov` (can be installed via `brew install lcov` on macOS).
packageFilters:
fileExists:
- coverage/lcov.info