-
Notifications
You must be signed in to change notification settings - Fork 115
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
Allow exclusion of files from minification step #494
Comments
What problems exactly are caused? A slight modification of the minify script can solve this easily (i.e. by ignoring the |
In my case, the full CSS stylesheet was not being applied. Some stuff magically worked, other stuff didn't. I also think the easiest way to fix the problem would be to just always ignore files that are already minimized as indicated by their names + a short mention in the docs about it. |
@tbeason Could you provide more details? It'd be good to know what worked and what didn't so that all possible errors are avoided. 😄 |
One thing that for sure didn't work was that the Bootstrap table styles I was trying to apply would not work properly (like row hovering or table striping). I don't think it really matters much though because the right thing to do is to just not try to minify a file that has already been minified. |
@zdroid the minification script I'm using here is a python script that's released under LGPL3 so I'm a bit wary of modifying it myself (assuming that's what you suggest), though given I call it (like a bash call), I could modify that call to avoid specific file patterns which would not touch the code. I haven't tried to reproduce the problem but I would still think that trying to minify an already-minified file is not very clever, whether it can lead to bugs is maybe surprising but it still seems like a good idea to not do it what do you think? |
Right. Perhaps we can leave them unminified by default, but also add an option to minify them. |
It was brought to my attention (@tbeason, thanks!) that the minification step of already-minified assets can cause problems (e.g.
bootstrap.min.css
). It would seem reasonable to just not touch these assets as they, more likely than not, have been expertly optimized.A kwarg
skip_minify = [...]
could do the trick in optimize, a global var@def = skip_minify = []
(like ignore)The text was updated successfully, but these errors were encountered: