grunt-uncss
grunt-uncss copied to clipboard
Improve README with "on top of stack" info
I just set up grunt-uncss alongside processhtml. Task order was:
- CSS Preprocessor > Cache folder
- UnCSS > Cache folder (again)
- Minify > Deploy folder
as it felt quite unnecessary to drop processhtml in just satisfy a workflow that I wasn't using, I tried running in the deploy folder on the minified result. And it was great, as the result was an even (slightly) smaller file. On top of that, I just dropped it into my stack/task list at the top/end and haven't had to modify anything just to fit it in. Now the task order is
- CSS Preprocessor > Cache folder
- Minify > Deploy folder
- UnCSS on minified file > Deploy folder
I'm in the opinion that an explanation about this (most basic and easy) usage should be added to the README.
I fully agree :) I'll probably get to this sometime next week but if you'd like to take a stab at refining the readme before that a PR would most definitely be welcome. Thanks for bringing this up!
I tend to stay away from writing docs that aren't for my own projects as I'm no native speaker. But thanks for trusting me on that one - you would regret it ;)
IMO, uncss should always come before the final minifcation. Especially if you are using clean-css which does some fancy stuff.
In one of my projects I do this personally:
grunt.registerTask("build", [
"clean",
"jekyll",
"useminPrepare",
"copy",
"concat",
"uncss",
"cssmin",
"uglify",
"filerev",
"usemin",
"htmlmin"
]);
I'd be happy for us to provide more guidance around this in the README. Perhaps..
(Optional: compile Sass/Less/Stylus to CSS) -> CSS -> UnCSS -> Minify ?
@addyosmani: sounds good, yeah. Maybe in a section named "Suggested workflow" or something?
Sgtm!