aboutsummaryrefslogtreecommitdiff
path: root/bin/uglifyjs
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-05 01:54:20 +0800
committerGitHub <noreply@github.com>2017-03-05 01:54:20 +0800
commitea9ab9fb0e48b4bf011da67f86652f148ae6ed1a (patch)
treee9eced3a259b590f4b868e9a5d73508c029b55cb /bin/uglifyjs
parentce54c9cceef68b78be7cc429988df26add904d9b (diff)
downloadtracifyjs-ea9ab9fb0e48b4bf011da67f86652f148ae6ed1a.tar.gz
tracifyjs-ea9ab9fb0e48b4bf011da67f86652f148ae6ed1a.zip
resolve issue with outdated version of async (#1549)
fixes #746
Diffstat (limited to 'bin/uglifyjs')
-rwxr-xr-xbin/uglifyjs12
1 files changed, 8 insertions, 4 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 ]----- */