garris / garris/BackstopJS

Core install? (integrated, but avoid puppeteer install)

Open
#903 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

**TLDR**: I want to have `backstopjs` in my project's package.json, but still be able to avoid the chromium download that usually happens (via puppeteer) on install.

Standard install of backstop with `yarn add backstopjs` will include the puppeteer installation, and that will in turn include the chromium download. On a CI system (or in certain corporate setups) this will fail because of the direct download.
The workaround ("Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.") is fine for a one-off developer setup, and fine if you don't need to have backstopjs integrated with the project.

I'm trying to find a way to integrate backstop into a project (shared among various developers on Mac and Windows, and always behind the corporate wall), without requiring a bunch of manual setup for each person.

Basically, I can't just add `backstopjs` to the `package.json` `devDependencies` because it will break the yarn install for the whole project. And if I instead provide instructions (or an npm script) for the global install of backstopjs (with the SKIP...DOWNLOAD environment), then I can't use backstop in an [integrated way](https://github.com/garris/BackstopJS#integration-options-local-install).

```json
scripts: {
"backstop:install": "cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn global add backstopjs",
}
```
*Best solution I have, but doesn't allow for project integrations*

I noticed that puppeteer has a default install, but they also have a [puppeteer-core](https://www.npmjs.com/package/puppeteer-core) install that skips the chromium download. Would it be possible to get a `backstop-core` package that works similarly? Or can anyone recommend any other way to handle this? - Thanks

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the project's package.json dependency setup and the documented local-install integration options. Compare the requested project-local install with the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD workaround and puppeteer-core alternative; done means a project can depend on BackstopJS without an unwanted Chromium download while retaining integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.