# glance2pdf

> Tool for quickly reviewing your site for style issues.

Latest version **1.0.1** (published 2015-11-07) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-11-07 |
| First published | 2015-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aaron Blondeau |
| Maintainers | salidasoftware |

## Links

- npm: https://www.npmjs.com/package/glance2pdf
- Repository: https://github.com/salidasoftware/glance
- Issues: https://github.com/salidasoftware/glance/issues
- npm.io page: https://npm.io/package/glance2pdf

## Dependencies (6)

- [jade](https://npm.io/package/jade.md) ^1.11.0
- [moment](https://npm.io/package/moment.md) ^2.10.6
- [promise](https://npm.io/package/promise.md) ^7.0.4
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [node-horseman](https://npm.io/package/node-horseman.md) ^2.8.1
- [foundation-sites](https://npm.io/package/foundation-sites.md) ^5.5.3

## Recent versions

- 1.0.1 (latest) — 2015-11-07
- 1.0.0 — 2015-11-07

## README

# glance
Tool for quickly reviewing your site for style issues.

## Installation

    npm install glance2pdf

## Usage

    var glance2pdf = require('glance2pdf');
    
    var urls = [
      'http://www.salidasoftware.com',
      'http://www.salidasoftware.com/contact/'
    ];
    
    glance2pdf
      .delay(2000)
      .width(640)
      .height(480)
      .ua('Mozilla/5.0 ;Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; like Gecko')
      .at(urls).then(function(output){
        console.log("Output is in "+output);
      });

### With Authentication

    var glance2pdf = require('glance2pdf');
    
    var urls = [
      'http://www.salidasoftware.com',
      'http://www.salidasoftware.com/contact/'
    ];
    
    glance2pdf
      .delay(2000)
      .width(640)
      .height(480)
      .ua('Mozilla/5.0 ;Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; like Gecko')
      .login('http://www.salidasoftware.com/login')
      .username('open')
      .password('sesame')
      .username_selector('input[name="email"]')        //default is input[name="username"]
      .password_selector('#password')                  //default is input[name="password"]
      .login_button_selector('button[type="submit"]')  //default is input[type="submit"]
      .at(urls).then(function(output){
        console.log("Output is in "+output);
      });
      
      
### With Custon Steps

glance2pdf uses [horseman](http://www.horsemanjs.org/) to drive the browser.  In place of a url, you can also use a horseman promise (glance2pdf will call .close() for you).

    var glance2pdf = require('glance2pdf');
    
    var Horseman = require('node-horseman');
    var horseman = new Horseman();
    horseman.userAgent(glance2pdf.settings.ua);
    horseman.viewport(640, 480);
    var url_promise = horseman
    .open('http://local.juicyplatform.com/dev')
    .do(function(done){
      setTimeout(done,600);
    })
    .evaluate(function(){
      localStorage.setItem('home_help', '');
    })
    .open('http://local.juicyplatform.com/dev')
    .do(function(done){
      setTimeout(done,600);
    });
    
    var urls = [
      'http://www.salidasoftware.com',
      'http://www.salidasoftware.com/contact/',
      url_promise
    ];
    
    glance2pdf
      .delay(2000)
      .width(640)
      .height(480)
      .ua('Mozilla/5.0 ;Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; like Gecko')
      .at(urls).then(function(output){
        console.log("Output is in "+output);
      });

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