From d03196aa966d8038a44c6508b72bd187a529a43d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 8 Jan 2015 16:34:24 -0500 Subject: [PATCH] feature(patch) util -> checkup, execon --- lib/server/patch.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/server/patch.js b/lib/server/patch.js index ed5b0578..15db1f8b 100644 --- a/lib/server/patch.js +++ b/lib/server/patch.js @@ -1,22 +1,19 @@ (function() { 'use strict'; - var DIR = '../', - - fs = require('fs'), - - Util = require(DIR + 'util'), + var fs = require('fs'), + check = require('checkup'), diff = require('daffy'), - flop = require('flop'), + exec = require('execon'), ERROR_MSG = 'File is to big. ' + 'Could not patch files ' + 'bigger then '; module.exports = function(name, patch, options, callback) { - Util.check(arguments, ['name', 'patch', 'callback']); + check(arguments, ['name', 'patch', 'callback']); if (!callback) { callback = options; @@ -44,7 +41,7 @@ if (error) { callback(error); } else { - error = Util.exec.try(function() { + error = exec.try(function() { diffResult = diff.applyPatch(data, patch); });