* Fix issue #8326, quiet the @babel/cli with --quiet cli option. * --quiet and --verbose options now conflict with each other.
This commit is contained in:
parent
1d1fab4ea2
commit
4e5ac1fd5c
@ -129,12 +129,14 @@ export default async function({
|
||||
compiledFiles += await handle(filename);
|
||||
}
|
||||
|
||||
if (!cliOptions.quiet) {
|
||||
console.log(
|
||||
`Successfully compiled ${compiledFiles} ${
|
||||
compiledFiles !== 1 ? "files" : "file"
|
||||
} with Babel.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (cliOptions.watch) {
|
||||
const chokidar = util.requireChokidar();
|
||||
|
||||
@ -144,7 +144,14 @@ commander.option(
|
||||
"--include-dotfiles",
|
||||
"Include dotfiles when compiling and copying non-compilable files",
|
||||
);
|
||||
commander.option("--verbose", "Log everything");
|
||||
commander.option(
|
||||
"--verbose",
|
||||
"Log everything. This option conflicts with --quiet",
|
||||
);
|
||||
commander.option(
|
||||
"--quiet",
|
||||
"Don't log anything. This option conflicts with --verbose",
|
||||
);
|
||||
commander.option(
|
||||
"--delete-dir-on-start",
|
||||
"Delete the out directory before compilation",
|
||||
@ -207,6 +214,10 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
|
||||
errors.push("--delete-dir-on-start requires --out-dir");
|
||||
}
|
||||
|
||||
if (commander.verbose && commander.quiet) {
|
||||
errors.push("--verbose and --quiet cannot be used together");
|
||||
}
|
||||
|
||||
if (
|
||||
!commander.outDir &&
|
||||
filenames.length === 0 &&
|
||||
@ -282,6 +293,7 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
|
||||
copyFiles: opts.copyFiles,
|
||||
includeDotfiles: opts.includeDotfiles,
|
||||
verbose: opts.verbose,
|
||||
quiet: opts.quiet,
|
||||
deleteDirOnStart: opts.deleteDirOnStart,
|
||||
sourceMapTarget: opts.sourceMapTarget,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user