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 "debug" option in library #145
Comments
Thanks! PS. Do you think the tests should run with debug enabled so that we see the stats and stuff? |
I don't think it's necessary as verifying minified output is what matters the most. |
Ok. I was trying the new option but I don't see anything on the cmd window Using echo("### Combining css files...");
// pack.css
var inCss = cat([
"_static/css/bootstrap.css",
"_static/css/font-awesome.css",
"_static/css/jquery.fancybox.css",
"_static/css/jquery.fancybox-thumbs.css",
"_static/css/style.css"
]);
var minifiedCss = new CleanCSS({
debug: true,
keepSpecialComments: 0,
selectorsMergeMode: "ie8"
}).minify(inCss);
writeText(buildTarget + "_static/css/pack.css", minifiedCss);
|
That's because only CLI prints this output to stderr. It's up to you to decide what to do with it when using a library. You can access debug data from:
I think it should be up to one who uses the library to decide how / if to output that data. |
I don't think that's right in this case. I mean I expected to see the stats by just using the |
What if someone wants to access minification stats but does not want to have it printed to stderr? |
I guess they can redirect stderr in that case. When one enables debug it's because they want to see the stats IMO. Also,
This doesn't seem very user friendly. It has no units and those brackets. |
Another thing, I think a warning or something should be shown when |
I don't agree. After all it's a library access so people expect raw data and should know how to deal with it. It's the CLI where nice output matters. |
Well how about the brackets at least? They show up even when |
Would you prefer an empty string? |
I meant when |
Not sure if an empty string is better. Maybe leave it like this and wait for feedback from other people too. |
Ok, let's wait and see! |
Example:
The text was updated successfully, but these errors were encountered: