Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wraith

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wraith

A responsive screenshot comparison tool. Based on the Ruby version available at http://github.comm/BBC-News/wraith

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Wraith

A responsive screenshot comparison tool. Based on the Ruby version available at http://github.com/BBC-News/wraith

CLI app

Install

	npm install --global wraith

###Usage

Usage:
wraith --config <config>

Options:
-h, --help		Output help information
--v, --version	Output version information

Examples:
wraith --config chrome

Configuration file

Wraith uses a json based configuration file that allows you specfify a large number of options. You can create as many configurations files as you need and call them from the cli using the --config flag. All congiguration files must be stored within the config folder.

Below is an example configuration file:

{
	"project": "Test", (Optional name for the project, if supplied it will be used within the generated gallery only)

	Specify one or two domains
	"domains": {
		"bbb.co.uk": "http://www.bbc.co.uk",
		"live.bbc.co.uk": "http://live.bbc.co.uk"
	},

	Engines supported are phantomjs, slimerjs and triflejs but in theory any phantomjs based headless browser can be supported via a custom snap.js file
	"engines" : [
		"phantomjs"
	],

	Specify as many sizes as you wish
	"sizes": [
		"320",
		"768",
		"1440"
	],

	"outputDir": "test/chrome/", (Output directory within the /shots directory)

	You can choose to specfiy a list of paths to be used or you can crawl the site. If paths are provided they will take precident and the spider file will be ignored.

	"paths": [
		"/",
		"/news/",
		"/news/local/",
		"/news/england/york_and_north_yorkshire/",
		"/weather/"
	],

	If no paths are specified then a site crawl will take place and the results will be save in the location specified within this option
	"spider": "spider/test.txt", (Specify which file should be used for the spider txt file)

	"snap": "snap/test/chrome.js", (Specify snap.js which is used to take the screenshots)
	"fuzz": "20%", (Adjusts the sensitivity of the image comparison)
	"maxConnections": 20 (Limit the amount of concurrent processes)
}

License

MIT © James Bell

Keywords

FAQs

Package last updated on 17 Mar 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc