Skip to content

Commit d669ac5

Browse files
authored
Mixed dev doc improvements (#7387)
1 parent 3923e96 commit d669ac5

File tree

9 files changed

+27
-17
lines changed

9 files changed

+27
-17
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ reviewer will reformat your code themselves if necessary.
4141
[pr]: https://help.github.com/articles/creating-a-pull-request/
4242

4343
Functional changes will require tests to be added or changed. The tests live in
44-
the `test/` directory, and are run with `pub run test`. If you need to create
44+
the `test/` directory, and are run with `dart test`. If you need to create
4545
new tests, use the existing tests as a guideline for what they should look like.
4646

4747
Before you send your pull request, make sure all the tests pass! Just run
48-
`pub run test`.
48+
`dart test`.
4949

5050
### File headers
5151

app/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config
2-
# To update generated code, run `pub run build_runner build`
2+
# To update generated code, run `dart run build_runner build`
33
targets:
44
pub_dev:
55
sources:

app/dart_test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ tags:
55
presubmit:
66
skip: false # Don't skip when running in presubmit
77
fragile:
8-
skip: 'Only run fragile tests manually with `pub run test -P fragile`'
8+
skip: 'Only run fragile tests manually with `dart run test -P fragile`'
99
presets:
1010
fragile:
1111
skip: false # Don't skip when running in -P fragile
1212
sanity:
13-
skip: 'Run sanity-check tests manually with `pub test -P sanity`.'
13+
skip: 'Run sanity-check tests manually with `dart test -P sanity`.'
1414
presets:
1515
sanity:
1616
skip: false # Don't skip these tests.

doc/development.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The main directories that one would be looking at:
2727
The in-memory server starts with no data. Prepopulated data can be created
2828
with test-profiles, using the following steps:
2929

30-
### Create a test-profile description
30+
### Create a test-profile description
3131

3232
A test-profile is a short description of packages, publishers, users,
3333
their flags and relations.
@@ -39,14 +39,22 @@ defaultUser: '[email protected]'
3939
packages:
4040
- name: retry
4141
- name: http
42+
publishers:
43+
- # Only `example.com`` and `verified.com`` will verify.
44+
# See app/lib/fake/backend/fake_domain_verifier.dart
45+
name: example.com
46+
members:
47+
48+
role: admin
4249
```
4350
4451
### Process and create data file
4552
4653
Using the test-profile above, the following process will:
47-
- fetch the latest versions and the archive file from pub.dev
54+
- create the publishers and users.
55+
- fetch the latest versions and the archive file from pub.dev.
4856
- publish the archive locally under the name of the user or
49-
the publisher in the test-profile description
57+
the publisher in the test-profile description.
5058
- analyze the packages and runs dartdoc on them
5159
- stores the results and all the entities in a local file.
5260
@@ -74,12 +82,14 @@ cd app/
7482
dart bin/fake_server.dart run --data-file=dev-data-file.jsonl
7583
```
7684

85+
The fake_server.dart script picks up changes and rebuilds your style sheets when initializing.
86+
7787
## Local accounts
7888

7989
The web app and the API endpoints use a simple mechanism to map access tokens
80-
to authenticated accounts: `user-at-domain-dot-com` gets mapped to `[email protected]`.
90+
to authenticated accounts: `user-at-domain-dot-com` gets mapped to `[email protected]`.
8191

82-
- On the web app one can use this token by clicking on the `Sign in` top nav item.
92+
- On the web app, use `localhost:8080/[email protected]` to sign in.
8393
- On the API endpoints one should send the `Authorization` header with `Bearer $token` as value.
8494

8595
## Updating generated code
@@ -90,7 +100,7 @@ annotations. Input files are usually listed in `build.yaml`, and generated
90100
files usually suffixed `.g.dart`. To generate code use:
91101

92102
```bash
93-
dart pub run build_runner build
103+
dart run build_runner build
94104
```
95105

96106
## Working with `mono_repo`

pkg/_popularity/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Not to be published.
77
To update the generated code – `lib/popularity.g.dart` – run
88

99
```console
10-
$ pub run build_runner build
10+
$ dart run build_runner build
1111
```

pkg/_pub_shared/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config
2-
# To update generated code, run `pub run build_runner build`
2+
# To update generated code, run `dart run build_runner build`
33
targets:
44
$default:
55
sources:

pkg/code_coverage/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ APP_TEST_PID=$!
4141
sleep 15;
4242

4343
cd "${CODE_COVERAGE_DIR}"
44-
dart pub run coverage:collect_coverage \
44+
dart run coverage:collect_coverage \
4545
--uri=http://localhost:20202 \
4646
-o "${OUTPUT_DIR}/raw/app_unit.json" \
4747
--wait-paused \
@@ -60,7 +60,7 @@ rm ${APP_ALL_TEST_PATH}
6060

6161
echo "Exporting to LCOV"
6262
cd "${APP_DIR}"
63-
dart pub run coverage:format_coverage \
63+
dart run coverage:format_coverage \
6464
--packages "${APP_DIR}/.dart_tool/package_config.json" \
6565
-i "${OUTPUT_DIR}/raw/app_unit.json" \
6666
--base-directory "${PROJECT_DIR}" \

pkg/pub_integration/tool/test-fake-with-local-dart-sdks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ LOCAL_DART_SDKS_DIR="${PUB_INTEGRATION_DIR}/.local-dart-sdks"
1212
ls -1 ${LOCAL_DART_SDKS_DIR} | while read i;
1313
do
1414
echo "Running tests using ${i}..."
15-
PUB_INTEGRATION_CLIENT_SDK_DIR="${LOCAL_DART_SDKS_DIR}/${i}" pub run test test/pub_integration_test.dart
15+
PUB_INTEGRATION_CLIENT_SDK_DIR="${LOCAL_DART_SDKS_DIR}/${i}" run test test/pub_integration_test.dart
1616
done

pkg/pub_worker/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config
2-
# To update generated code, run `pub run build_runner build`
2+
# To update generated code, run `dart run build_runner build`
33
targets:
44
$default:
55
sources:

0 commit comments

Comments
 (0)