Socket
Socket
Sign inDemoInstall

@pixolith/percy-cli

Package Overview
Dependencies
0
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pixolith/percy-cli

## How to use


Version published
Weekly downloads
5
increased by400%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Percy Cli

How to use

Put the following percy object inside the projects package.json. Setup percy.io and connect the project to github. Builds will run on every deployment.

Options

Optional parameters can be omitted and will be filled with the default percy configuration of this package.

If you only want to use the default settings from this package, just place the following object inside your projects package.json

"percy": {
  "version": 2
}

Full Config Example

"percy": {
  // percy version (required)
  "version": 2,
  // percy snapshot options (optional) (default see package json)
  "snapshot": {
    // screen widths to be snapshotted by percy (max-width is 2000)
    "widths": [
        320,
        468,
        768,
        1024,
        1920
    ],
    // screen min-height to be applied in snapshots
    "minHeight": 2000,
    // add custom css to e.G hide an iframe or layer (css string only)
    "percyCss": "iframe { display: none; }",
    // number specifying the pixel density to render the page in (default=1)
    "device-pixel-ratio": 1
  },
  // discovery options to use for this snapshot's asset discovery (optional) (default see percy docs)
  "discovery": {
    // additional hostnames to save asset contents from (no default)
    "allowedHostnames": [],
    // hostnames to immediately abort requests from (no default)
    "disallowedHostnames": [],
    // HTTP headers to be sent for each request made during asset discovery (no default)
    "requestHeaders": {
      "Authorization": ""
    },
    // username/password combo to authenticate requests for Percy (no default)
    "authorization": {
      "username": "",
      "password": ""
    },
    // amount of time in miliseconds when the snapshot gets canceled after the page had zero network requests (no default)
    "networkIdleTimeout": 500,
    // maximum concurrency in snapshotting - usually this is fine (should not exceed 6) (no default)
    "concurrency": 3,
    // Disables asset discovery caches (no default)
    "disableCache": false,
    // Options for the asset discovery (default see below)
    "launchOptions": {
      // Path to a Chromium browsers executable on disk (no default)
      "executable": "/path/to/chromium/executable",
      // Hide or show browser (default=true)
      "headless": true,
      // Browser args (no default)
      "args": [],
      // Timeout for how long the browser will try to launch (default=30000) 
      "timeout": 30000
    }
  },
  // Percy stage (optional) (default see package json)
  "stage": {
    // Server environment (optional)
    "staging": {
      // Urls to test (optional)
      "urls": [
        "/",
        "/kontakt",
        "/saisonale-dekoration",
      ]
    },
    "production": {
      "urls": [
        "/",
        "/kontakt",
        "/saisonale-dekoration",
      ]
    }
  }
}

FAQs

Last updated on 02 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc