diff options
Diffstat (limited to 'node_modules/@babel/cli/lib/babel/file.js')
| -rw-r--r-- | node_modules/@babel/cli/lib/babel/file.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/node_modules/@babel/cli/lib/babel/file.js b/node_modules/@babel/cli/lib/babel/file.js index 1568138b..5a5d37d2 100644 --- a/node_modules/@babel/cli/lib/babel/file.js +++ b/node_modules/@babel/cli/lib/babel/file.js @@ -41,8 +41,8 @@ function _fs() { } var util = require("./util.js"); var watcher = require("./watcher.js"); -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } function _default(_x) { return _ref.apply(this, arguments); } @@ -158,10 +158,7 @@ function _ref() { if (!_fs().existsSync(filename)) return; const stat = _fs().statSync(filename); if (stat.isDirectory()) { - const dirname = filename; - util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions).forEach(function (filename) { - _filenames.push(_path().join(dirname, filename)); - }); + _filenames.push(...util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions)); } else { _filenames.push(filename); } |
