# nixon

> screenshot tool

Latest version **1.0.2** (published 2015-07-24) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install nixon
pnpm add nixon
yarn add nixon
bun add nixon
```

Provides the command `nixon`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-07-24 |
| First published | 2015-07-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Joe Lanman |
| Maintainers | joelanman |
| Keywords | screenshot |

## Links

- npm: https://www.npmjs.com/package/nixon
- Repository: https://github.com/joelanman/nixon
- Homepage: https://github.com/joelanman/nixon#readme
- Issues: https://github.com/joelanman/nixon/issues
- npm.io page: https://npm.io/package/nixon

## Dependencies (4)

- [tracer](https://npm.io/package/tracer.md) ^0.7.4
- [minimist](https://npm.io/package/minimist.md) ^1.1.1
- [zero-fill](https://npm.io/package/zero-fill.md) ^2.2.1
- [node-horseman](https://npm.io/package/node-horseman.md) ^1.5.1

## Recent versions

- 1.0.2 (latest) — 2015-07-24
- 1.0.1 — 2015-07-24
- 1.0.0 — 2015-07-24

## README

# Nixon

A framework to step through a website saving screenshots, based on [Horseman](https://github.com/johntitus/node-horseman).

## You need

* [Node.js](http://node.js)
* [PhantomJS](http://phantomjs.org) - version 2 or later

## Getting started

* [Download Nixon](https://github.com/joelanman/nixon/archive/master.zip)

In the terminal, change to Nixon directory and run:

* `npm install`

* `node nixon`

The example script will run , and screenshots will be saved into a 'screenshots' folder.

## Scripts

Make a copy of `example-script.js`, for example `blog.js`

You can now run this script:

`node nixon blog`

### Script options

#### screenshotPath

Type: String

Where your screenshots will be saved. Supports the following tags:

- **#** - screenshot number (zero padded: ## outputs 01, ### outputs 001)
- **script** - name of the script
- **size.width**
- **size.height**
- **size.crop** - will output "full" or "crop" depending on the size set (see `sizes`)
- **step.name**

For example: "screenshots/[script]/[size.width]/[#]-[step.name]"

### sizes

Type: Array

The screen sizes you would like to capture. If you'd like the screenshot cropped to the set height, add "crop" as the 3rd item in the array.

For example `[[800, 600], [1280, 1024, "crop"]]`.

### steps

Type: Array

An array of step objects for the script to carry out (see below).

## Steps

#### expectedUrl

Type: String (URL)

If the browser is not on the `expectedUrl` at the end of this step, Nixon will log a warning in the console.

#### js

Type: Function

This JavaScript function will be run in the browser before the screenshot is taken.

If `open` is also set, it will run before `js`.

#### name

Type: String

The name of the step is used in the filename when saving screenshots.

#### open

Type: String (URL)

The browser will open the URL set here.

If `js` is also set, it will run after `open`.

#### screenshot

Type: Boolean
Default: `true`

If this is set to `false`, a screenshot won't be taken for this step.

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