Comparing version 1.11.1 to 1.11.2
@@ -69,2 +69,10 @@ // Generated by CoffeeScript 1.3.3 | ||
}, | ||
clone: function() { | ||
var args, target; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
target = {}; | ||
args.unshift(target); | ||
balUtilFlow.extend.apply(balUtilFlow, args); | ||
return target; | ||
}, | ||
each: function(obj, callback, context) { | ||
@@ -71,0 +79,0 @@ var broke, item, key, _i, _len; |
// Generated by CoffeeScript 1.3.3 | ||
(function() { | ||
var balUtilFlow, balUtilModules, | ||
var balUtilFlow, balUtilModules, balUtilPaths, | ||
__slice = [].slice; | ||
@@ -10,2 +10,4 @@ | ||
balUtilPaths = require(__dirname + '/paths'); | ||
balUtilModules = { | ||
@@ -228,6 +230,6 @@ spawn: function(command, opts, next) { | ||
nodeModulesPath = pathUtil.join(path, 'node_modules'); | ||
if (force === false && pathUtil.existsSync(nodeModulesPath)) { | ||
if (force === false && balUtilPaths.existsSync(nodeModulesPath)) { | ||
return next(); | ||
} | ||
if (!pathUtil.existsSync(packageJsonPath)) { | ||
if (!balUtilPaths.existsSync(packageJsonPath)) { | ||
return next(); | ||
@@ -234,0 +236,0 @@ } |
@@ -214,2 +214,13 @@ // Generated by CoffeeScript 1.3.3 | ||
}, | ||
scanlist: function(path, next) { | ||
balUtilPaths.scandir({ | ||
path: path, | ||
readFiles: true, | ||
ignoreHiddenFiles: true, | ||
next: function(err, list) { | ||
return next(err, list); | ||
} | ||
}); | ||
return this; | ||
}, | ||
scantree: function(path, next) { | ||
@@ -381,12 +392,15 @@ balUtilPaths.scandir({ | ||
} else { | ||
list[fileRelativePath] = 'file'; | ||
if (options.readFiles) { | ||
return balUtilPaths.readFile(fileFullPath, function(err, data) { | ||
var dataString; | ||
if (err) { | ||
return tasks.exit(err); | ||
} | ||
tree[file] = data.toString(); | ||
dataString = data.toString(); | ||
list[fileRelativePath] = dataString; | ||
tree[file] = dataString; | ||
return tasks.complete(); | ||
}); | ||
} else { | ||
list[fileRelativePath] = 'file'; | ||
tree[file] = true; | ||
@@ -393,0 +407,0 @@ return tasks.complete(); |
{ | ||
"name": "bal-util", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util", |
66246
1939
14