-
Notifications
You must be signed in to change notification settings - Fork 2k
CLI: Options to control output of comments #4638
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
Comments
Why? |
The last time command-line flags were discussed, the strong preference was to not add any more of them. Each one we add introduces more complexity, a need for more tests, etc. So if one is to be added, it needs a strong justification. In this particular case, one could pipe the CoffeeScript compiler’s output through Babel with its So if you’d like to make a case for why this is needed, please feel free and I’ll reopen if there’s consensus. |
@GeoffreyBooth I would really like to see this re-opened. I use lots of comments that I don't want emitted in the Javascript output, nor do I need an additional transpiler step, which would make my workflow too slow. Since retaining comments is a breaking change from CS1, it really ought to have been an opt-in feature to retain comments. However that's history now, so at the very least there should be an option to retain old behavior. |
There are lots of breaking changes, but none of them are opt-in. We don't want the complexity of making this configurable, especially since it's so easily managed through other tools. We're not trying to reproduce Babel. |
Now that #4572 has landed, it might be handy to be able to control the output of comments in the CLI.
I briefly started on a PR, but figured it would be a good idea to discuss first.
So, bike-shedding… maybe this could look like:
or maybe just
--comments=
where one of[ true, 'block', 'inline', false ]
is given as the value (corresponding to output all comments, block comments only, line comments only, or output comments).Thoughts?
The text was updated successfully, but these errors were encountered: