Skip to content
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

Improve README with "on top of stack" info #106

Open
franz-josef-kaiser opened this issue Jun 21, 2014 · 6 comments
Open

Improve README with "on top of stack" info #106

franz-josef-kaiser opened this issue Jun 21, 2014 · 6 comments

Comments

@franz-josef-kaiser
Copy link

I just set up grunt-uncss alongside processhtml. Task order was:

  1. CSS Preprocessor > Cache folder
  2. UnCSS > Cache folder (again)
  3. 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

  1. CSS Preprocessor > Cache folder
  2. Minify > Deploy folder
  3. 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.

@addyosmani
Copy link
Member

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!

@franz-josef-kaiser
Copy link
Author

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 ;)

@XhmikosR
Copy link
Member

XhmikosR commented Oct 3, 2014

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"
]);

@addyosmani
Copy link
Member

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 ?

@XhmikosR
Copy link
Member

XhmikosR commented Oct 3, 2014

@addyosmani: sounds good, yeah. Maybe in a section named "Suggested workflow" or something?

@addyosmani
Copy link
Member

Sgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants