corrected the grammar of option descriptions (#10589)
* corrected the grammar of option descriptions * added comment
This commit is contained in:
parent
c7d8b8a377
commit
58a646be59
@ -12,19 +12,19 @@ import pkg from "../../package.json";
|
||||
// Standard Babel input configs.
|
||||
commander.option(
|
||||
"-f, --filename [filename]",
|
||||
"filename to use when reading from stdin - this will be used in source-maps, errors etc",
|
||||
"The filename to use when reading from stdin. This will be used in source-maps, errors etc.",
|
||||
);
|
||||
commander.option(
|
||||
"--presets [list]",
|
||||
"comma-separated list of preset names",
|
||||
"A comma-separated list of preset names.",
|
||||
collect,
|
||||
);
|
||||
commander.option(
|
||||
"--plugins [list]",
|
||||
"comma-separated list of plugin names",
|
||||
"A comma-separated list of plugin names.",
|
||||
collect,
|
||||
);
|
||||
commander.option("--config-file [path]", "Path to a .babelrc file to use");
|
||||
commander.option("--config-file [path]", "Path to a .babelrc file to use.");
|
||||
commander.option(
|
||||
"--env-name [name]",
|
||||
"The name of the 'env' to use when loading configs and plugins. " +
|
||||
@ -40,97 +40,98 @@ commander.option(
|
||||
commander.option("--source-type [script|module]", "");
|
||||
commander.option(
|
||||
"--no-babelrc",
|
||||
"Whether or not to look up .babelrc and .babelignore files",
|
||||
"Whether or not to look up .babelrc and .babelignore files.",
|
||||
);
|
||||
commander.option(
|
||||
"--ignore [list]",
|
||||
"list of glob paths to **not** compile",
|
||||
"List of glob paths to **not** compile.",
|
||||
collect,
|
||||
);
|
||||
commander.option(
|
||||
"--only [list]",
|
||||
"list of glob paths to **only** compile",
|
||||
"List of glob paths to **only** compile.",
|
||||
collect,
|
||||
);
|
||||
|
||||
// Misc babel config.
|
||||
commander.option(
|
||||
"--no-highlight-code",
|
||||
"enable/disable ANSI syntax highlighting of code frames (on by default)",
|
||||
"Enable or disable ANSI syntax highlighting of code frames. (on by default)",
|
||||
);
|
||||
|
||||
// General output formatting.
|
||||
commander.option(
|
||||
"--no-comments",
|
||||
"write comments to generated output (true by default)",
|
||||
"Write comments to generated output. (true by default)",
|
||||
);
|
||||
commander.option(
|
||||
"--retain-lines",
|
||||
"retain line numbers - will result in really ugly code",
|
||||
"Retain line numbers. This will result in really ugly code.",
|
||||
);
|
||||
commander.option(
|
||||
"--compact [true|false|auto]",
|
||||
"do not include superfluous whitespace characters and line terminators",
|
||||
"Do not include superfluous whitespace characters and line terminators.",
|
||||
booleanify,
|
||||
);
|
||||
commander.option("--minified", "save as much bytes when printing [true|false]");
|
||||
commander.option(
|
||||
"--auxiliary-comment-before [string]",
|
||||
"print a comment before any injected non-user code",
|
||||
"Print a comment before any injected non-user code.",
|
||||
);
|
||||
commander.option(
|
||||
"--auxiliary-comment-after [string]",
|
||||
"print a comment after any injected non-user code",
|
||||
"Print a comment after any injected non-user code.",
|
||||
);
|
||||
|
||||
// General source map formatting.
|
||||
commander.option("-s, --source-maps [true|false|inline|both]", "", booleanify);
|
||||
commander.option(
|
||||
"--source-map-target [string]",
|
||||
"set `file` on returned source map",
|
||||
"Set `file` on returned source map.",
|
||||
);
|
||||
commander.option(
|
||||
"--source-file-name [string]",
|
||||
"set `sources[0]` on returned source map",
|
||||
"Set `sources[0]` on returned source map.",
|
||||
);
|
||||
commander.option(
|
||||
"--source-root [filename]",
|
||||
"the root from which all sources are relative",
|
||||
"The root from which all sources are relative.",
|
||||
);
|
||||
|
||||
// Config params for certain module output formats.
|
||||
commander.option(
|
||||
"--module-root [filename]",
|
||||
"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions",
|
||||
// eslint-disable-next-line max-len
|
||||
"Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions.",
|
||||
);
|
||||
commander.option("-M, --module-ids", "insert an explicit id for modules");
|
||||
commander.option("-M, --module-ids", "Insert an explicit id for modules.");
|
||||
commander.option(
|
||||
"--module-id [string]",
|
||||
"specify a custom name for module ids",
|
||||
"Specify a custom name for module ids.",
|
||||
);
|
||||
|
||||
// "babel" command specific arguments that are not passed to @babel/core.
|
||||
commander.option(
|
||||
"-x, --extensions [extensions]",
|
||||
"List of extensions to compile when a directory has been input [.es6,.js,.es,.jsx,.mjs]",
|
||||
"List of extensions to compile when a directory has been the input. [.es6,.js,.es,.jsx,.mjs]",
|
||||
collect,
|
||||
);
|
||||
commander.option(
|
||||
"--keep-file-extension",
|
||||
"Preserve the file extensions of the input files",
|
||||
"Preserve the file extensions of the input files.",
|
||||
);
|
||||
commander.option("-w, --watch", "Recompile files on changes");
|
||||
commander.option("-w, --watch", "Recompile files on changes.");
|
||||
commander.option(
|
||||
"--skip-initial-build",
|
||||
"Do not compile files before watching",
|
||||
"Do not compile files before watching.",
|
||||
);
|
||||
commander.option(
|
||||
"-o, --out-file [out]",
|
||||
"Compile all input files into a single file",
|
||||
"Compile all input files into a single file.",
|
||||
);
|
||||
commander.option(
|
||||
"-d, --out-dir [out]",
|
||||
"Compile an input directory of modules into an output directory",
|
||||
"Compile an input directory of modules into an output directory.",
|
||||
);
|
||||
commander.option(
|
||||
"--relative",
|
||||
@ -138,11 +139,11 @@ commander.option(
|
||||
);
|
||||
commander.option(
|
||||
"-D, --copy-files",
|
||||
"When compiling a directory copy over non-compilable files",
|
||||
"When compiling a directory copy over non-compilable files.",
|
||||
);
|
||||
commander.option(
|
||||
"--include-dotfiles",
|
||||
"Include dotfiles when compiling and copying non-compilable files",
|
||||
"Include dotfiles when compiling and copying non-compilable files.",
|
||||
);
|
||||
commander.option(
|
||||
"--verbose",
|
||||
@ -154,7 +155,7 @@ commander.option(
|
||||
);
|
||||
commander.option(
|
||||
"--delete-dir-on-start",
|
||||
"Delete the out directory before compilation",
|
||||
"Delete the out directory before compilation.",
|
||||
);
|
||||
|
||||
commander.version(pkg.version + " (@babel/core " + version + ")");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user