Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #39 from mobify/1.3.2
Browse files Browse the repository at this point in the history
use siteConfig to refer to site.json file
  • Loading branch information
ellenmobify committed Dec 8, 2015
2 parents 8a6982e + f1ad1ff commit ba6356a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions commands/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
var path = require('path');

try {
var site = require(path.join(path.resolve('./'), '/tests/system/site.json'));
var siteConfig = require(path.join(path.resolve('./'), '/tests/system/site.json'));
} catch (e) {
if (e instanceof Error && e.code === 'MODULE_NOT_FOUND') {
console.log('Not using optional site.json...');
Expand All @@ -40,8 +40,8 @@ var qs = require('querystring');
exports.command = function(url, callback) {
var browser = this;

if (site) {
site = site.profiles[site.activeProfile];
if (siteConfig) {
var site = siteConfig.profiles[siteConfig.activeProfile];

if (typeof url === 'function') {
callback = url;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nightwatch-commands",
"version": "1.3.1",
"version": "1.3.2",
"description": "A set of Mobify specific custom commands for Nightwatch.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit ba6356a

Please sign in to comment.