You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is some code that is unfortunately a bit complex, because we're trying to support both -n and --no-newline flags and this is a little tricky with the current state of meow and yargs-parser (which meow uses).
cli.flags.newline is set to false when --no-newline is passed.
The hope is that this complexity will be temporary and that the code can be refactored in the future, possibly along with some changes to either meow or yargs-parser, which meow uses.
We might be able to simplify this in the future if we use the boolean-negation feature in yargs-parser (see #16 (comment)) or if yargs-parser has or develops some way of indicating that a short flag is a negative flag (e.g.: -n sets a newline flag to false, just as --no-newline does).
The text was updated successfully, but these errors were encountered:
msabramo
added a commit
to msabramo/chalk-cli
that referenced
this issue
Sep 14, 2021
There is some code that is unfortunately a bit complex, because we're trying to support both
-n
and--no-newline
flags and this is a little tricky with the current state of meow and yargs-parser (which meow uses).The line looks like this:
There are two conditions in the
if
statement:cli.flags.noNewline
is set when-n
is passed.cli.flags.newline
is set tofalse
when--no-newline
is passed.The hope is that this complexity will be temporary and that the code can be refactored in the future, possibly along with some changes to either meow or yargs-parser, which meow uses.
We might be able to simplify this in the future if we use the
boolean-negation
feature in yargs-parser (see #16 (comment)) or if yargs-parser has or develops some way of indicating that a short flag is a negative flag (e.g.:-n
sets anewline
flag to false, just as--no-newline
does).The text was updated successfully, but these errors were encountered: