-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add whitespace
option
#14
Comments
Yes, that sounds like a bug. Why would you need to preserve the line/column in CSS? It makes sense in JS where you want stack traces to point to the correct source location, but you don't have that with CSS. |
Alright. I added a failing test for this, but I don't have time to fix this right now, so PR welcome :) |
Thank you. I'll try if I could :)) |
"Why would you need to preserve the line/column in CSS? It makes sense in JS where you want stack traces to point to the correct source location, but you don't have that with CSS." The developer tools in chrome use the sourcemap for pointing to file and line-number. This gets all wrong if comment-stripping remove lines. I tend to do css-editing in the browser devtools, and paste the result into the correct file, so this is actually a feature I would want. |
I think it would make sense to implement a |
For anyone that wants to work on this, see #18 for an initial attempt.
|
@issuehunt has funded $80.00 to this issue.
|
@sindresorhus has rewarded $72.00 to @yaodingyd. See it on IssueHunt
|
Hallo!
Your plugin works good, but there is one annoying fact - after removing comment block it left empty line, and it looks not very tidily.
I propose to add some options to plugin to have a choice (like in gulp-strip-comments):
false (default) - remove comment blocks entirely
true - replace comment blocks with white spaces where needed, in order to preserve the original line + column position of every code element.
NOTE: When this option is enabled, option trim is ignored.
false (default) - do not trim comments
true - remove empty lines that follow removed full-line comments
NOTE: This option has no effect when option space is enabled.
or at least add only first one.
Thanks.
IssueHunt Summary
Backers (Total: $80.00)
Submitted pull Requests
whitespace
optionTips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: