Closed kangw3n closed 8 years ago
I'm experiencing the same issue.
Well, for now I'm just passing the purified file into grunt-contrib-mincss. It's an extra step alright, but it does the trick.
It looks like a hardcoded options object was being passed to purify instead of the user-defined options
How have you fixed this @tpgmartin ? have no experience building grunt / nodejs tooling :/ disabled this great tool for now, I have the suspicion that some css I need still is getting removed. Together with missing explicit ignore rules that can be set this isn't yet quite optimal for all use-cases.
Hey @michahell I'm not sure I understand. The options parameter relates to the properties defined here https://github.com/purifycss/purifycss#options-optional, none of which explicitly state how much or little CSS should be removed.
This specific fix allows you to pass in the options as desired from your gruntfile.
For me, setting options as { minify: true }
doesn't minify the CSS. I think that was the original point of the issue.
@tpgmartin setting the info
parameter to true
does not give me a list of CSS that has been removed.
This is handy if you know that some CSS rule that you DO need, is getting removed. you can then either:
I think the original point is that the whole passed options object is not being picked up by PurifyCSS.
thanks @tpgmartin for the fix, I guess I'll use your version for now
This is fixed now. Will be publishing as soon as I get permissions on the grunt-purifycss npm package
Edit: done :100:
Im using sass and compass for my production, here's my code in grunt.
CSS can't be minify while i'm running this tasks