# gulp-phantomcss

> Gulp plugin for PhantomCSS

Latest version **0.3.0** (published 2016-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-phantomcss
pnpm add gulp-phantomcss
yarn add gulp-phantomcss
bun add gulp-phantomcss
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-11-14 |
| First published | 2014-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Dan Brooks |
| Maintainers | dangerdan |

## Links

- npm: https://www.npmjs.com/package/gulp-phantomcss
- Repository: https://github.com/danbroooks/gulp-phantomcss
- Homepage: http://github.com/danbroooks/gulp-phantomcss#readme
- Issues: https://github.com/danbroooks/gulp-phantomcss/issues
- npm.io page: https://npm.io/package/gulp-phantomcss

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) 3.10.1
- [casperjs](https://npm.io/package/casperjs.md) 1.1.3
- [gulp-util](https://npm.io/package/gulp-util.md) 3.0.7
- [phantomcss](https://npm.io/package/phantomcss.md) 1.1.3
- [phantomjs-prebuilt](https://npm.io/package/phantomjs-prebuilt.md) 2.1.7
- [through2-concurrent](https://npm.io/package/through2-concurrent.md) 1.1.1

## Recent versions

- 0.3.0 (latest) — 2016-11-14
- 0.2.0 — 2016-06-09
- 0.1.1 — 2015-08-12
- 0.1.0 — 2015-07-13
- 0.0.4 — 2014-09-09
- 0.0.3 — 2014-09-09
- 0.0.2 — 2014-09-09
- 0.0.1 — 2014-09-09

## README

# gulp-phantomcss

Run your phantomCSS tests with Gulp.

## Installation
Uninstall global node installations of casperjs and phantomjs

`npm install gulp-phantomcss -D`

## Usage

```js
var gulp = require('gulp');
var phantomcss = require('gulp-phantomcss');

gulp.task('phantomcss', function (){
  gulp.src('./testsuite.js')
    .pipe(phantomcss());
});
```

Example ./testsuite.js :

```js
casper.
  start( 'http://www.google.co.uk' ).
  then(function(){
    phantomcss.screenshot('#hplogo', 'google');
  });

casper.run();
```

### Options

Options passed in to the plugin will be forwarded on to phantomcss, these include:

#### options.screenshots

Type: `String`

Default: `'screenshots'`

Directory where screenshot test fixtures are stored.

#### options.comparisonResultRoot

Type: `String`

Default: `'results'`

Directory where source, diff and failure screenshots are stored.

#### options.breakOnError

Type: `boolean`

Default: `false`

If true, gulp task will exit with error code if there are any failing tests.

The following options passed in to the plugin will be forwarded on to casperjs, these include:

#### options.viewportSize

Type: `Array`

Default: `[1280, 800]`

Viewport size to run the test in. Useful for running tests for multiple window sizes.

#### options.logLevel

Type: `String`

Default: `'error'`

Log level for CasperJS, see [CasperJS: Logging](http://casperjs.readthedocs.org/en/latest/logging.html) for more information.

## Testing

Run tests with `npm test`

---
_Source: https://npm.io/package/gulp-phantomcss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
