From 3215d4a3c9c00a14780bb94c0800b143a8711f3a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 18 Apr 2016 16:30:58 -0700 Subject: [PATCH] move the exports to the top --- src/docker.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/docker.js b/src/docker.js index 0de4ca4e6..92f1fe442 100644 --- a/src/docker.js +++ b/src/docker.js @@ -1,20 +1,5 @@ 'use strict'; -var addons = require('./addons.js'), - async = require('async'), - assert = require('assert'), - child_process = require('child_process'), - config = require('./config.js'), - constants = require('./constants.js'), - debug = require('debug')('box:src/docker.js'), - Docker = require('dockerode'), - once = require('once'), - safe = require('safetydance'), - semver = require('semver'), - spawn = child_process.spawn, - util = require('util'), - _ = require('underscore'); - exports = module.exports = { connection: connectionInstance(), downloadImage: downloadImage, @@ -33,6 +18,7 @@ exports = module.exports = { }; function connectionInstance() { + var Docker = require('dockerode'); var docker; if (process.env.BOX_ENV === 'test') { @@ -48,6 +34,20 @@ function connectionInstance() { return docker; } +var addons = require('./addons.js'), + async = require('async'), + assert = require('assert'), + child_process = require('child_process'), + config = require('./config.js'), + constants = require('./constants.js'), + debug = require('debug')('box:src/docker.js'), + once = require('once'), + safe = require('safetydance'), + semver = require('semver'), + spawn = child_process.spawn, + util = require('util'), + _ = require('underscore'); + function debugApp(app, args) { assert(!app || typeof app === 'object');