From 221d78d2e2dbf333465c0bf61130d46c79598602 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 19 Nov 2014 12:12:16 +1100 Subject: [PATCH] arrayify whitelist and blacklist, inherit moduleRoot from sourceRoot and vice versa --- lib/6to5/file.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/6to5/file.js b/lib/6to5/file.js index d26194a1e3..24b3c7350d 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -39,6 +39,17 @@ File.normaliseOptions = function (opts) { // normalise windows path separators to unix opts.filename = opts.filename.replace(/\\/g, "/"); + opts.blacklist = util.arrayify(opts.blacklist); + opts.whitelist = util.arrayify(opts.whitelist); + + _.defaults(opts, { + moduleRoot: opts.sourceRoot + }); + + _.defaults(opts, { + sourceRoot: opts.moduleRoot + }); + _.defaults(opts, { filenameRelative: opts.filename });