[@babel/cli] Copy ignored files by default (#11063)
This commit restores the pre-7.8.0 behavior of the --copy-files option, by making --copy-ignored default to true when --copy-files is enabled.
This commit is contained in:
@@ -140,6 +140,7 @@ commander.option(
|
||||
"--relative",
|
||||
"Compile into an output directory relative to input directory or file. Requires --out-dir [out]",
|
||||
);
|
||||
|
||||
commander.option(
|
||||
"-D, --copy-files",
|
||||
"When compiling a directory copy over non-compilable files.",
|
||||
@@ -148,6 +149,11 @@ commander.option(
|
||||
"--include-dotfiles",
|
||||
"Include dotfiles when compiling and copying non-compilable files.",
|
||||
);
|
||||
commander.option(
|
||||
"--no-copy-ignored",
|
||||
"Exclude ignored files when copying non-compilable files.",
|
||||
);
|
||||
|
||||
commander.option(
|
||||
"--verbose",
|
||||
"Log everything. This option conflicts with --quiet",
|
||||
@@ -165,11 +171,6 @@ commander.option(
|
||||
"Use a specific extension for the output files",
|
||||
);
|
||||
|
||||
commander.option(
|
||||
"--copy-ignored",
|
||||
"Include ignored files when copying non-compilable files.",
|
||||
);
|
||||
|
||||
commander.version(pkg.version + " (@babel/core " + version + ")");
|
||||
commander.usage("[options] <files ...>");
|
||||
// register an empty action handler so that commander.js can throw on
|
||||
@@ -315,12 +316,12 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
|
||||
outDir: opts.outDir,
|
||||
relative: opts.relative,
|
||||
copyFiles: opts.copyFiles,
|
||||
copyIgnored: opts.copyFiles && opts.copyIgnored,
|
||||
includeDotfiles: opts.includeDotfiles,
|
||||
verbose: opts.verbose,
|
||||
quiet: opts.quiet,
|
||||
deleteDirOnStart: opts.deleteDirOnStart,
|
||||
sourceMapTarget: opts.sourceMapTarget,
|
||||
copyIgnored: opts.copyIgnored,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user