Skip to content

Commit

Permalink
docs: use bash tag to get better formatting (puppeteer#10086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade committed Apr 26, 2023
1 parent 4dd4cb9 commit c356e8f
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ browser instance.

## Building the image

```sh
```bash
docker build -t puppeteer-chrome-linux . # `puppeteer-chrome-linux` is the name of the image.
```

## Running the image

```sh
```bash
docker run -i --init --rm --cap-add=SYS_ADMIN --name puppeteer-chrome puppeteer-chrome-linux node -e "`cat test.js`"
```

Expand Down
4 changes: 2 additions & 2 deletions docs/browsers-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Manage and launch browsers/drivers from a CLI or programmatically.

Use `npx` to run the CLI:

```sh
```bash
npx @puppeteer/browsers --help
```

CLI help will provide all documentation you need to use the CLI.

```sh
```bash
npx @puppeteer/browsers --help # help for all commands
npx @puppeteer/browsers install --help # help for the install command
npx @puppeteer/browsers launch --help # help for the launch command
Expand Down
18 changes: 9 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ again.

1. Clone this repository

```sh
```bash
git clone https://github.com/puppeteer/puppeteer
cd puppeteer
```
Expand All @@ -30,21 +30,21 @@ again.

2. Install the dependencies

```sh
```bash
npm install
# Or to download Firefox
PUPPETEER_PRODUCT=firefox npm install
```

3. Build all packages

```sh
```bash
npm run build
```

4. Run all tests

```sh
```bash
npm test
```

Expand All @@ -69,7 +69,7 @@ again.

To build a single package, you can run:

```sh
```bash
npm run build --workspace <package> # e.g. puppeteer
```

Expand All @@ -82,7 +82,7 @@ packages is sufficient. This is all possible due to

To continuously build a package, you can run:

```sh
```bash
npm run build --watch --workspace <package> # e.g. puppeteer
```

Expand All @@ -97,7 +97,7 @@ It's possible some generated artifacts (such as
rely on complex conditions (such as names of distinct files) that cannot be
captured by the build system. To clean artifacts, you can run
```sh
```bash
npm run clean
# or specify the package
npm run clean --workspace <package>
Expand Down Expand Up @@ -274,7 +274,7 @@ Copy the provided default `.vscode/launch.template.json` to `.vscode/launch.json

Remember to build test before launching via:

```sh
```bash
npm run build --workspace @puppeteer-test/test
```

Expand Down Expand Up @@ -316,7 +316,7 @@ revision that changed the behavior. The `bisect` script can be helpful here.
Given a pattern for one or more unit tests, it will automatically bisect the
current range:

```sh
```bash
npm run bisect -- --good 686378 --bad 706915 script.js
npm run bisect -- --unit-test Response.fromCache
```
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ launch, so you don’t need to specify `PUPPETEER_EXECUTABLE_PATH` as well.

For example, if you wish to keep the Chromium download in `~/.npm/chromium`:

```sh
```bash
export PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium
npm ci

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if you want to try something out, you have to add it to your test file.

3. Run your server code with `--inspect-brk`. For example,

```sh
```bash
node --inspect-brk path/to/script.js
```

Expand All @@ -126,7 +126,7 @@ DevTools protocol. You can debug this by setting the `DEBUG` environment
variable before running your script. This will log internal traffic via
[`debug`](https://github.com/visionmedia/debug) under the `puppeteer` namespace.

```sh
```bash
# Basic verbose logging
env DEBUG="puppeteer:*" node script.js
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the
The latest image is tagged as `latest` and other tags match Puppeteer versions.
For example,

```sh
```bash
docker pull ghcr.io/puppeteer/puppeteer:latest # pulls the latest
docker pull ghcr.io/puppeteer/puppeteer:16.1.0 # pulls the image that contains Puppeteer v16.1.0
```
Expand All @@ -19,7 +19,7 @@ running the image requires the `SYS_ADMIN` capability.

To use the docker image directly, run:

```sh
```bash
docker run -i --init --cap-add=SYS_ADMIN --rm ghcr.io/puppeteer/puppeteer:latest node -e "$(cat path/to/script.js)"
```

Expand Down
6 changes: 3 additions & 3 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ the installation directory.

For example,

```sh
```bash
PUPPETEER_CACHE_DIR=$(pwd) npm install puppeteer
PUPPETEER_CACHE_DIR=$(pwd) node <script-path>
```
Expand Down Expand Up @@ -603,13 +603,13 @@ and if you want to run Puppeteer tests in amazon-linux, follow these steps.
comes as part of
[EPEL (Extra Packages for Enterprise Linux)](https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/):

```sh
```bash
sudo amazon-linux-extras install epel -y
```

1. Next, install Chromium:

```sh
```bash
sudo yum install -y chromium
```

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Assuming you have a checkout of the Puppeteer repo and have run npm i (or yarn) to install the dependencies, the examples can be run from the root folder like so:

```sh
```bash
NODE_PATH=../ node examples/search.js
```

Expand Down
4 changes: 2 additions & 2 deletions packages/browsers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Manage and launch browsers/drivers from a CLI or programmatically.

Use `npx` to run the CLI:

```sh
```bash
npx @puppeteer/browsers --help
```

CLI help will provide all documentation you need to use the CLI.

```sh
```bash
npx @puppeteer/browsers --help # help for all commands
npx @puppeteer/browsers install --help # help for the install command
npx @puppeteer/browsers launch --help # help for the launch command
Expand Down

0 comments on commit c356e8f

Please sign in to comment.