Skip to content

Commit

Permalink
chore(repo): Use melos for monorepo dev
Browse files Browse the repository at this point in the history
Adds `melos` configuration for managing package linking and development.
  • Loading branch information
dnys1 committed Apr 14, 2024
1 parent b78d7a9 commit 49c18c5
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 42 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/celest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
with:
channel: stable
cache: true
- name: Setup Melos
run: dart pub global activate melos
- name: Get Packages
working-directory: packages/celest
run: dart pub get && dart pub get --directory=example/celest
run: melos bootstrap
- name: Analyze
working-directory: packages/celest
run: dart analyze --fatal-infos --fatal-warnings
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/celest_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
with:
channel: stable
cache: true
- name: Setup Melos
run: dart pub global activate melos
- name: Get Packages
working-directory: packages/celest_auth
run: dart pub get && dart pub get --directory=example/celest
run: melos bootstrap
- name: Analyze
working-directory: packages/celest_auth
run: dart analyze --fatal-infos --fatal-warnings
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/celest_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0
with:
cache: true
- name: Setup Melos
run: dart pub global activate melos
- name: Get Packages
working-directory: packages/celest_core
run: dart pub get
run: melos bootstrap
- name: Analyze
working-directory: packages/celest_core
run: dart analyze
Expand All @@ -41,9 +42,10 @@ jobs:
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0
with:
cache: true
- name: Setup Melos
run: dart pub global activate melos
- name: Get Packages
working-directory: packages/celest_core
run: dart pub get
run: melos bootstrap
- name: Test
working-directory: packages/celest_core
run: dart test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
doc/api/
**/doc/api/
pubspec_overrides.yaml
pubspec.lock

## RUST ##
# will have compiled files and executables
Expand Down
10 changes: 10 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: celest_dev

packages:
- packages/**
ignore:
- "**/example/celest"

ide:
intellij:
enabled: false
10 changes: 0 additions & 10 deletions packages/celest_auth/example/celest/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ dependencies:
celest_core: ^0.3.0
http: ">=0.13.0 <2.0.0"

dependency_overrides:
celest:
path: ../../../celest
celest_auth:
path: ../../
celest_core:
path: ../../../celest_core
native_storage:
path: ../../../native/storage

dev_dependencies:
lints: ^3.0.0
test: ^1.24.0
14 changes: 0 additions & 14 deletions packages/celest_auth/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,6 @@ dependencies:
sdk: flutter
flutter_state_notifier: ^1.0.0

dependency_overrides:
cedar:
path: ../../cedar
celest:
path: ../../celest
celest_auth:
path: ../
celest_core:
path: ../../celest_core
corks_cedar:
path: ../../corks_cedar
native_storage:
path: ../../native/storage

dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
6 changes: 0 additions & 6 deletions packages/celest_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ dependencies:
shelf_router: ^1.1.4
stream_transform: ^2.1.0

dependency_overrides:
celest_core:
path: ../celest_core
native_storage:
path: ../native/storage

dev_dependencies:
build_runner: ^2.4.8
built_value_generator: ^8.9.1
Expand Down
4 changes: 0 additions & 4 deletions packages/celest_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ dependencies:
path: ^1.9.0
native_storage: ^0.1.0

dependency_overrides:
native_storage:
path: ../native/storage

dev_dependencies:
lints: ^3.0.0
test: ^1.24.0
8 changes: 8 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: celest_dev
publish_to: none

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
dev_dependencies:
melos: ^5.3.0

0 comments on commit 49c18c5

Please sign in to comment.