Skip to content

Commit d26f3c6

Browse files
committed
chore: add development environment setup script and move dependency overrides
1 parent 0b930e6 commit d26f3c6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

pubspec_overrides.dev.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is used for development overrides. Run `dart tool/dev.dart` to apply these overrides.
2+
# `pubspec_overrides.yaml` is ignored by git, so it won't affect CI or other developers.
3+
dependency_overrides:
4+
grumpy_annotations:
5+
path: ../grumpy_annotations

tool/dev.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// this is a tool script so a logging framework is lowkey overkill.
2+
// ignore_for_file: avoid_print
3+
4+
import 'dart:io';
5+
6+
/// Sets up the development environment by copying `pubspec_overrides.dev.yaml` to `pubspec_overrides.yaml`.
7+
/// This expects all other packages to be checked out in a sibling directory to the main `grumpy` package.
8+
void main() async {
9+
final src = File('pubspec_overrides.dev.yaml');
10+
11+
if (!await src.exists()) {
12+
print('No pubspec_overrides.dev.yaml found. Skipping.');
13+
return;
14+
}
15+
16+
final dst = File('pubspec_overrides.yaml');
17+
18+
await src.copy(dst.path);
19+
20+
print('Copied pubspec_overrides.dev.yaml to pubspec_overrides.yaml');
21+
}

0 commit comments

Comments
 (0)