aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/uglifyjs12
-rw-r--r--package.json1
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 367d66e2..4dd234dc 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -8,7 +8,6 @@ var sys = require("util");
var yargs = require("yargs");
var fs = require("fs");
var path = require("path");
-var async = require("async");
var acorn;
var screw_ie8 = true;
var ARGS = yargs
@@ -319,8 +318,11 @@ var STATS = {};
var TOPLEVEL = null;
var P_RELATIVE = ARGS.p && ARGS.p == "relative";
var SOURCES_CONTENT = {};
+var index = 0;
-async.eachLimit(files, 1, function (file, cb) {
+!function cb() {
+ if (index == files.length) return done();
+ var file = files[index++];
read_whole_file(file, function (err, code) {
if (err) {
print_error("ERROR: can't read file: " + file);
@@ -388,7 +390,9 @@ async.eachLimit(files, 1, function (file, cb) {
});
cb();
});
-}, function () {
+}();
+
+function done() {
var OUTPUT_FILE = ARGS.o;
var SOURCE_MAP = (ARGS.source_map || ARGS.source_map_inline) ? UglifyJS.SourceMap({
@@ -537,7 +541,7 @@ async.eachLimit(files, 1, function (file, cb) {
}));
}
}
-});
+}
/* -----[ functions ]----- */
diff --git a/package.json b/package.json
index f152a51e..4512eb71 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,6 @@
"LICENSE"
],
"dependencies": {
- "async": "~0.2.6",
"source-map": "~0.5.1",
"uglify-to-browserify": "~1.0.0",
"yargs": "~3.10.0"