quilted
v1.0.1
Published
A css/js coverage tool for websites.
Downloads
27
Maintainers
Readme
quilted
A css/js coverage tool for websites built using Puppeteer.
Installation
With npm:
npm install --save quilted
With yarn:
yarn add quilted
Usage
CLI
quilted <url> [options]
Module
import quilted from 'quilted';
quilted('https://example.com').then(coverage => {
// ...
});
CLI
$ quilted --help
Usage: quilted <url> [options]
Basic options:
--no-css disables css code coverage [boolean]
--no-js disables js code coverage [boolean]
--origin, -o only cover same-origin assets [boolean]
Puppeteer options:
--timeout, -t maximum number of milliseconds to wait for the browser
to start [number]
--viewportWidth, --vw sets viewport width for page render [number]
--viewportHeight, --vh sets viewport height for page render [number]
--viewport, -V sets viewport for page render i.e. 800x600 [string]
--userAgent, --ua sets the user agent for the request [string]
--headers, -H sets headers for the page request
example: $0 <url> -H "X-Header: 123" [array]
Options:
--version, -v Show version number [boolean]
--help Show help [boolean]
Module Options
| Option | Description | Default |
|-----------|-------------------|---------|
| js
| Run js coverage. | true
|
| css
| Run css coverage. | true
|
| sameOrigin
| Only cover requests from the same origin | false
|
Puppeteer Supported Options
| Option | Description | Default |
|-----------|-------------------|---------|
| args
| Chrome command line flags | null
|
| timeout
| Maximum number of milliseconds to wait for the browser to start | 30000
|
| cookies
| Set cookies for the page request. | null
|
| headers
| Set headers for the page request. | null
|
| userAgent
| Sets the user agent for the page request. | Default Chrome Headless User Agent String |
| viewport
| Sets the viewport size for the page request. | 800x600
|