feature(patch) util -> checkup, execon

This commit is contained in:
coderaiser 2015-01-08 16:34:24 -05:00
parent f157c67756
commit d03196aa96

View file

@ -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);
});