add --copy-files bin/babel flag

This commit is contained in:
Sebastian McKenzie 2015-02-25 21:56:19 +11:00
parent 5889233adc
commit 4d72bffa30
2 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,8 @@ module.exports = function (commander, filenames, opts) {
var src = path.join(dirname, filename);
if (util.canCompile(filename)) {
write(src, filename);
} else if (commander.copyFiles) {
outputFileSync(path.join(commander.outDir, filename), fs.readFileSync(src));
}
});
} else {

View File

@ -28,6 +28,9 @@ commander.option("-M, --module-ids", "Insert module id in modules", false);
commander.option("-R, --react-compat", "Makes the react transformer produce pre-v0.12 code");
commander.option("--keep-module-id-extensions", "Keep extensions when generating module ids", false);
commander.option("-a, --auxiliary-comment [comment]", "Comment text to prepend to all auxiliary code");
commander.option("-D, --copy-files", "When compiling a directory copy over non-compilable files");
commander.on("--help", function () {
var outKeys = function (title, obj) {