Comparing version 1.0.0 to 1.0.1
@@ -43,5 +43,4 @@ #!/usr/bin/env node | ||
var config = args; | ||
if( opts.config && args[0]) { | ||
if (config.length === 0) { | ||
if( opts.config ) { | ||
if ( args[0] === '' ) { | ||
console.error(chalk.yellow('You must specifiy a configuration file')); | ||
@@ -48,0 +47,0 @@ return showHelp(); |
13
index.js
@@ -5,3 +5,4 @@ 'use strict'; | ||
wraith = require('./lib/wraith'), | ||
spider = require('./lib/spider'); | ||
spider = require('./lib/spider'), | ||
chalk = require('chalk'); | ||
@@ -15,5 +16,11 @@ module.exports.run = run; | ||
outputFolder = '', | ||
baseFolder = process.cwd() + '/'; | ||
baseFolder = process.cwd() + '/', | ||
config = null; | ||
var config = require(baseFolder + 'config/' + configFile + '.json'); | ||
try { | ||
config = require(baseFolder + 'config/' + configFile + '.json'); | ||
} catch(err) { | ||
console.error(chalk.red('Configuration file specified could not be found or accessed')); | ||
return false; | ||
} | ||
@@ -20,0 +27,0 @@ outputFolder = typeof config.outputDir === 'undefined' ? baseFolder + 'shots/' : baseFolder + 'shots/' + config.outputDir; |
{ | ||
"name": "wraith", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A responsive screenshot comparison tool. Based on the Ruby version available at http://github.comm/BBC-News/wraith", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18533
412