add --ignore and --extensions flag to 6to5-node to compliment require hook options

This commit is contained in:
Sebastian McKenzie
2014-10-16 10:02:16 +11:00
parent 5b08924c02
commit 45c8c29cdf
4 changed files with 29 additions and 10 deletions

View File

@@ -5,6 +5,8 @@ var sourceMap = require("source-map");
var transform = require("../../lib/6to5/transform");
var chokidar = require("chokidar");
var mkdirp = require("mkdirp");
var util2 = require("../../lib/6to5/util");
var util = require("./util");
var path = require("path");
var fs = require("fs");
var _ = require("lodash");
@@ -14,12 +16,8 @@ commander.option("-s, --source-maps", "Save source map alongside the compiled co
commander.option("-f, --filename [filename]", "Filename to use when reading from stdin - this will be used in source-maps, errors etc [stdin]", "stdin");
commander.option("-w, --watch", "Recompile files on changes");
var list = function (val) {
return val ? val.split(",") : [];
};
commander.option("-w, --whitelist [whitelist]", "Whitelist of transformers to ONLY use", list);
commander.option("-b, --blacklist [blacklist]", "Blacklist of transformers to NOT use", list);
commander.option("-w, --whitelist [whitelist]", "Whitelist of transformers to ONLY use", util2.list);
commander.option("-b, --blacklist [blacklist]", "Blacklist of transformers to NOT use", util2.list);
commander.option("-o, --out-file [out]", "Compile all input files into a single file");
commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory");