-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround to make --no-newline work #23
Workaround to make --no-newline work #23
Conversation
Does line 64 need to be changed? |
@qix:
You're referring to this line: noNewline: { ? Do you think this line should change? I'm not seeing a reason why, but maybe you're seeing something that I am not...? |
I added a new test for the |
@@ -83,7 +83,7 @@ function init(data) { | |||
|
|||
const fn = dotProp.get(chalk, styles.join('.')); | |||
process.stdout.write(fn(data.replace(/\n$/, ''))); | |||
if (!cli.flags.noNewline) { | |||
if (!cli.flags.noNewline && cli.flags.newline !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use a short code comment explaining the logic and linking to the yarns-parser
issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, but I didn't create a yargs-parser
issue yet because I found a possible way to do it using an existing boolean-negation
feature in yargs-parser.
See #16 (comment)
That approach wouldn't require changing yargs-parser
and would only require a small change to meow
.
I thought that might be a pretty good approach, since it seemed to require only a small change to meow and since meow is one of your projects, it would be easy to get done.
Check out #16 (comment) and see if you like that, or if you think it's better to request a feature from yargs-parser
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus: See 5e680e1. It adds a comment that explains and points the reader to #30
We can discuss things in that issue and/or link to any meow or yargs-parser issues or PRs that are created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer an option in yarns-parser
. That would benefit all consumers using yarns-parsers
and not just meow
. It seems like it is something that would be generally useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Would you please copy this comment to #30 ?
I think it will be nice to have it in an open issue so it is more likely to get eyeballs.
a59ac22
to
f5be8db
Compare
and referencing issue created to track simplifying it: chalk#30
@sindresorhus are we still waiting for feedback or is this good to go? |
🎉 |
See: #16 (comment)