From 6b26b261150e93b2b2934b580778ea8d711b1ead Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 10 Nov 2016 15:32:58 +0200 Subject: [PATCH] chore(root) rm iife --- lib/server/root.js | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/server/root.js b/lib/server/root.js index 51c6fbe5..46505f8e 100644 --- a/lib/server/root.js +++ b/lib/server/root.js @@ -1,15 +1,11 @@ -(function() { - 'use strict'; +'use strict'; + +var config = require('./config'); +var mellow = require('mellow'); + +module.exports = function(dir) { + var root = config('root') || '/'; - var DIR = './', - config = require(DIR + 'config'), - mellow = require('mellow'); - - module.exports = function(dir) { - var root = config('root') || '/'; - - dir = mellow.pathToWin(dir, root); - - return dir; - }; -})(); + return mellow.pathToWin(dir, root); +}; +