diff --git a/docs/api.md b/docs/api.md index 116db36a..514b64d4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -7,6 +7,7 @@ - [Puppeteer](#puppeteer) + * [Environment Variables](#environment-variables) * [class: Puppeteer](#class-puppeteer) + [puppeteer.connect(options)](#puppeteerconnectoptions) + [puppeteer.launch([options])](#puppeteerlaunchoptions) @@ -137,6 +138,12 @@ Puppeteer is a Node library which provides a high-level API to control Chromium over the DevTools Protocol. +### Environment Variables + +Puppeteer looks for certain environment variables to aid its operations: + +- `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` - defines HTTP proxy settings that are used to download and run Chromium. +- `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` - do not download bundled Chromium during installation step. ### class: Puppeteer diff --git a/install.js b/install.js index 73f2809c..6a5a92ff 100644 --- a/install.js +++ b/install.js @@ -14,6 +14,11 @@ * limitations under the License. */ +if (process.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD) { + console.log('**INFO** Skipping Chromium download. "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" environment variable was found.'); + return; +} + const Downloader = require('./utils/ChromiumDownloader'); const platform = Downloader.currentPlatform(); const revision = require('./package').puppeteer.chromium_revision;