From 3a2766bcd962dad927af2efbb19ff32274878577 Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Tue, 14 Jul 2015 18:30:21 -0700 Subject: [PATCH] Stop using `lib` fn, breaks browserify --- index.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index 3f23808..26b76cb 100644 --- a/index.js +++ b/index.js @@ -1,24 +1,22 @@ "use strict"; -function lib(path) { return require("./lib/" + path); } - -var Config = lib("config"), - MCP = lib("mcp"), - API = lib("api"); +var Config = require("./lib/config"), + MCP = require("./lib/mcp"), + API = require("./lib/api"); var exports = module.exports = {}; -exports.MCP = lib("mcp"); -exports.Robot = lib("robot"); -exports.Driver = lib("driver"); -exports.Adaptor = lib("adaptor"); +exports.MCP = require("./lib/mcp"); +exports.Robot = require("./lib/robot"); +exports.Driver = require("./lib/driver"); +exports.Adaptor = require("./lib/adaptor"); -exports.Utils = lib("utils"); -exports.Logger = lib("logger"); +exports.Utils = require("./lib/utils"); +exports.Logger = require("./lib/logger"); exports.IO = { - DigitalPin: lib("io/digital-pin"), - Utils: lib("io/utils") + DigitalPin: require("./lib/io/digital-pin"), + Utils: require("./lib/io/utils") }; exports.robot = MCP.create;