Added missing code block language in docs (#147481)
- added language for all code blocks - replaced `bash` or `shell` with `sh` for consistency. - added `sh` and `console` in the GitHub template link generator. - updated test for GitHub template.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
To run the scrolling benchmark on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --profile test_driver/scroll_perf.dart
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ More detailed logs should be in `build/complex_layout_scroll_perf.timeline.json`
|
||||
|
||||
To measure startup time on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter run --profile --trace-startup
|
||||
```
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Performance benchmarks use either flutter drive or the web benchmark harness.
|
||||
|
||||
To run the cull opacity benchmark on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --profile -t test_driver/run_app.dart --driver test_driver/cull_opacity_perf_test.dart
|
||||
```
|
||||
|
||||
@@ -20,7 +20,7 @@ More detailed logs should be in `build/cull_opacity_perf.timeline.json`.
|
||||
|
||||
To run the cubic-bezier benchmark on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --profile -t test_driver/run_app.dart --driver test_driver/cubic_bezier_perf_test.dart
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ More detailed logs should be in `build/cubic_bezier_perf.timeline.json`.
|
||||
To run the backdrop filter benchmark on a device:
|
||||
To run a mobile benchmark on a device:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
flutter drive --profile -t test_driver/run_app.dart --driver test_driver/[test_name]_test.dart
|
||||
```
|
||||
|
||||
@@ -69,7 +69,7 @@ host machine. The following tests are E2E:
|
||||
|
||||
These tests should be run by:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
flutter drive --profile -t test/[test_name]_e2e.dart --driver test_driver/e2e_test.dart
|
||||
```
|
||||
|
||||
@@ -118,7 +118,7 @@ and the profile contains unobfuscated names.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
```sh
|
||||
cd dev/benchmarks/macrobenchmarks
|
||||
|
||||
# Runs in profile mode using the HTML renderer
|
||||
@@ -130,7 +130,7 @@ flutter run --web-renderer=canvaskit --profile -d web-server lib/web_benchmarks.
|
||||
|
||||
You can also run all benchmarks exactly as the devicelab runs them:
|
||||
|
||||
```
|
||||
```sh
|
||||
cd dev/devicelab
|
||||
|
||||
# Runs using the HTML renderer
|
||||
|
||||
@@ -4,7 +4,7 @@ To run these benchmarks on a device, first run `flutter logs' in one
|
||||
window to see the device logs, then, in a different window, run any of
|
||||
these:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter run --release lib/gestures/velocity_tracker_bench.dart
|
||||
flutter run --release lib/gestures/gesture_detector_bench.dart
|
||||
flutter run --release lib/stocks/animation_bench.dart
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
To run the scrolling benchmark on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --profile test_driver/scroll_perf.dart
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ More detailed logs should be in `build/platform_views_scroll_perf.timeline.json`
|
||||
|
||||
To measure startup time on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter run --profile --trace-startup
|
||||
```
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
To run the scrolling benchmark on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --profile test_driver/scroll_perf.dart
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ More detailed logs should be in `build/platform_views_scroll_perf_hybrid_composi
|
||||
|
||||
To measure startup time on a device:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter run --profile --trace-startup
|
||||
```
|
||||
|
||||
|
||||
@@ -165,15 +165,15 @@ For example To remove a published package corresponding to the git hash
|
||||
`d444a455de87a2e40b7f576dc12ffd9ab82fd491`, first do a dry run of the script to
|
||||
see what it will do:
|
||||
|
||||
```
|
||||
$ dart ./unpublish_package.dart --temp_dir=/tmp/foo --revision d444a455de87a2e40b7f576dc12ffd9ab82fd491
|
||||
```sh
|
||||
dart ./unpublish_package.dart --temp_dir=/tmp/foo --revision d444a455de87a2e40b7f576dc12ffd9ab82fd491
|
||||
```
|
||||
|
||||
And once you've verified the output of the dry run to be sure it is what you
|
||||
want to do, run:
|
||||
|
||||
```
|
||||
$ dart ./unpublish_package.dart --confirm --temp_dir=/tmp/foo --revision d444a455de87a2e40b7f576dc12ffd9ab82fd491
|
||||
```sh
|
||||
dart ./unpublish_package.dart --confirm --temp_dir=/tmp/foo --revision d444a455de87a2e40b7f576dc12ffd9ab82fd491
|
||||
```
|
||||
|
||||
and it will perform the actions. You will of course need to have access
|
||||
|
||||
@@ -35,7 +35,7 @@ All available commands can be seen via:
|
||||
|
||||
Releases are initialized with the `start` sub-command, like:
|
||||
|
||||
```
|
||||
```sh
|
||||
conductor start \
|
||||
--candidate-branch=flutter-2.2-candidate.10 \
|
||||
--release-channel=beta \
|
||||
|
||||
@@ -9,7 +9,7 @@ Intended for use with devicelab tests.
|
||||
If you want to run a driver test locally, to debug a problem with a test, you
|
||||
can use this command from the appropriate subdirectory:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
flutter drive -t <test> --driver <driver>
|
||||
```
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Android custom host app
|
||||
|
||||
Android host app for a Flutter module created using
|
||||
```
|
||||
```sh
|
||||
$ flutter create -t module hello
|
||||
```
|
||||
and placed in a sibling folder to (a clone of) the host app.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Android host app
|
||||
|
||||
Android host app for a Flutter module created using
|
||||
```
|
||||
```sh
|
||||
$ flutter create -t module hello
|
||||
```
|
||||
and placed in a sibling folder to (a clone of) the host app.
|
||||
|
||||
@@ -28,7 +28,7 @@ subtle translation issues.
|
||||
|
||||
To run the test cases locally, use `flutter drive`[^2]:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
flutter drive lib/frame_rate_main.dart --driver test_driver/frame_rate_test.dart
|
||||
```
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Used by the `module_test_ios.dart` device lab test.
|
||||
|
||||
iOS host app for a Flutter module created using
|
||||
```
|
||||
```sh
|
||||
$ flutter create -t module hello
|
||||
```
|
||||
and placed in a sibling folder to (a clone of) the host app.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Android host app
|
||||
|
||||
Android host app for a Flutter module created using
|
||||
```
|
||||
```sh
|
||||
$ flutter create -t module hello
|
||||
```
|
||||
and placed in a sibling folder to (a clone of) the host app.
|
||||
|
||||
@@ -6,7 +6,7 @@ chrome://version.
|
||||
|
||||
Start `chromedriver` using the following command:
|
||||
|
||||
```
|
||||
```sh
|
||||
chromedriver --port=4444
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ mode you'd like to run the test in.
|
||||
|
||||
Here's an example of running an integration test:
|
||||
|
||||
```
|
||||
```sh
|
||||
flutter drive --target=test_driver/text_editing_integration.dart \
|
||||
-d web-server \
|
||||
--browser-name=chrome \
|
||||
|
||||
@@ -4,7 +4,7 @@ Script that generates component theme data defaults based on token data.
|
||||
|
||||
## Usage
|
||||
Run this program from the root of the git repository:
|
||||
```
|
||||
```sh
|
||||
dart dev/tools/gen_defaults/bin/gen_defaults.dart [-v]
|
||||
```
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@ output files can be generated without the Internet.
|
||||
|
||||
The tool can be run based on the existing database. To do this, run:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
/PATH/TO/ROOT/bin/gen_keycodes
|
||||
```
|
||||
|
||||
The tool can also be run by rebuilding the database by drawing online information
|
||||
anew before generating the files. To do this, run:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
/PATH/TO/ROOT/bin/gen_keycodes --collect
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user