Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit eea4d5a

Browse files
committed
Switch readme example commands from pub to dart pub
1 parent 6c665ac commit eea4d5a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ Tools
1616

1717
dart pub global activate coverage
1818

19-
Consider adding the `pub global run` executables directory to your path.
19+
Consider adding the `dart pub global run` executables directory to your path.
2020
See [Running a script from your PATH](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path)
2121
for more details.
2222

2323
#### Collecting coverage from the VM
2424

2525
```
2626
dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
27-
pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates
27+
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates
2828
```
2929

30-
or if the `pub global run` executables are on your PATH,
30+
or if the `dart pub global run` executables are on your PATH,
3131

3232
```
3333
collect_coverage --uri=http://... -o coverage.json --resume-isolates
@@ -44,10 +44,10 @@ all isolates are paused before collecting coverage.
4444
#### Formatting coverage data
4545

4646
```
47-
pub global run coverage:format_coverage --package=app_package -i coverage.json
47+
dart pub global run coverage:format_coverage --package=app_package -i coverage.json
4848
```
4949

50-
or if the `pub global run` exectuables are on your PATH,
50+
or if the `dart pub global run` exectuables are on your PATH,
5151

5252
```
5353
format_coverage --package=app_package -i coverage.json
@@ -70,15 +70,15 @@ collect_coverage:
7070

7171
```
7272
dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
73-
pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage
73+
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage
7474
```
7575

7676
To gather branch level coverage information, pass `--branch-coverage` to *both*
7777
collect_coverage and the Dart command you're gathering coverage from:
7878

7979
```
8080
dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
81-
pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --branch-coverage
81+
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --branch-coverage
8282
```
8383

8484
Branch coverage requires Dart VM 2.17.0, with service API v3.56. Function,
@@ -87,5 +87,5 @@ those flags:
8787

8888
```
8989
dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
90-
pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage --branch-coverage
90+
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage --branch-coverage
9191
```

0 commit comments

Comments
 (0)