Skip to content

Commit

Permalink
docs: recommend a dev install of Playwright in the docs. (#2355)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser authored May 26, 2020
1 parent d532cd5 commit 4e86d39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Headless execution is supported for all the browsers on all platforms.
## Usage

```
npm i playwright
npm i -D playwright
```

This installs Playwright and browser binaries for Chromium, Firefox and WebKit. Once installed, you can `require` Playwright in a Node.js script and automate web browser interactions.
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4393,7 +4393,7 @@ If Playwright doesn't find them in the environment, a lowercased variant of thes

```sh
# Install browsers to the shared location.
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/playwright-browsers npm install playwright
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/playwright-browsers npm install --save-dev playwright
# Use shared location to find browsers.
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/playwright-browsers node playwright-script.js
```
Expand Down
10 changes: 5 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Each version of Playwright needs specific versions of browser binaries to operat
- `~/.cache/ms-playwright` on Linux

```sh
npm i playwright
npm i -D playwright
```

These browsers will take few hundreds of megabytes of the disk space when installed:
Expand All @@ -33,7 +33,7 @@ du -hs ./Library/Caches/ms-playwright/*
You can override default behavior using environment variables. When installing Playwright, ask it to download browsers into a specific location:

```sh
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npm i playwright
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npm i -D playwright
```

When running Playwright scripts, ask it to search for browsers in a shared location:
Expand Down Expand Up @@ -65,7 +65,7 @@ binaries. In this case, Playwright can be configured to download from a custom
location using the `PLAYWRIGHT_DOWNLOAD_HOST` env variable.

```sh
$ PLAYWRIGHT_DOWNLOAD_HOST=192.168.1.78 npm i playwright
$ PLAYWRIGHT_DOWNLOAD_HOST=192.168.1.78 npm i -D playwright
```

<br>
Expand All @@ -78,7 +78,7 @@ browser binaries are managed separately.
This can be done by setting `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` variable before installation.

```sh
$ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i playwright
$ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright
```

<br>
Expand All @@ -97,7 +97,7 @@ Using these packages is as easy as using a regular Playwright:
Install a specific package

```sh
$ npm i playwright-webkit
$ npm i -D playwright-webkit
```

Require package
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Use npm or Yarn to install Playwright in your Node.js project. Playwright requires Node.js 10 or higher.

```sh
npm i playwright
npm i -D playwright
```

During installation, Playwright downloads browser binaries for Chromium, Firefox and WebKit. This sets up your environment for browser automation with just one command. It is possible to modify this default behavior for monorepos and other scenarios. See [installation parameters](installation.md) for mode details.
Expand Down

0 comments on commit 4e86d39

Please sign in to comment.