add extensions option to babel cli
This commit is contained in:
parent
4be27ee72c
commit
f24b5164d4
@ -30,7 +30,7 @@ module.exports = function (commander, filenames, opts) {
|
||||
var handleFile = function (src, filename) {
|
||||
if (util.shouldIgnore(src)) return;
|
||||
|
||||
if (util.canCompile(filename)) {
|
||||
if (util.canCompile(filename, commander.extensions)) {
|
||||
write(src, filename);
|
||||
} else if (commander.copyFiles) {
|
||||
outputFileSync(path.join(commander.outDir, filename), fs.readFileSync(src));
|
||||
|
||||
@ -37,6 +37,7 @@ each(options, function (option, key) {
|
||||
commander.option(arg, desc.join(" "));
|
||||
})
|
||||
|
||||
commander.option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been input [.es6,.js,.es,.jsx]");
|
||||
commander.option("-w, --watch", "Recompile files on changes");
|
||||
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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user