-
Notifications
You must be signed in to change notification settings - Fork 174
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
Can't get grunt-css to work #46
Comments
That error happens when UnCSS cannot find a stylesheet. Could you try to pass it the csspath option, and see if the error persists? |
Please try the |
I am using 0.1.7. I tried all the options I could think of. If I do
I end up with a zero byte tidy.css. |
@giakki: With 0.7.5 and this uncss: {
options: {
stylesheets: "<%= concat_css.dist.dest %>"
//csspath: "<%= dirs.dest %>/assets/css/"
},
dist: {
src: "<%= dirs.dest %>/**/*.html",
dest: "<%= dirs.dest %>/assets/css/tidy.css"
}
}, I get
Remember you can get my source from here to test for yourself if you need to. |
Sorry for the delay! Anyhow, I managed to make it work setting the "stylesheets" option:
I couldn't check that the result was correct however, since as you said the Gruntfile isn't complete ;) Another solution would be to run UnCSS against the pages served by Jekyll, but I feel like this option should be better supported, I'll add an option to specify the project root! |
@giakki: Thanks for your time looking into this. A My Gruntfile is as good as it will get for the time being, but due to a bug in grunt-concat-css the remaining CSS has URLs paths wrong. (ref webdoc/grunt-concat-css#2) I will check again later, but I really hope uncss becomes more usable :) @addyosmani: there is no info shown in CLI when the output file is created. Perhaps you could follow what other plugins do? And maybe add support for report option?
|
I agree that a |
Awesome, thanks! Any chance you use the same color scheme the other plugins use? Example https://travis-ci.org/mpc-hc/mpc-hc.org/builds/17590145 |
Thanks for pointing this out, @XhmikosR. |
Added PR that outputs a report. Best, |
@XhmikosR: Hehe, yes, I'm quite fond of branching. It's an old habit, mostly due to because I rarely work with forked repositories. Well, I've only added byte sizes of original and uncss-ed 'files'. Thanks for your feedback, |
Untested but from looking at the patch it seems it's exactly what I meant. Thanks! |
I will close the issue here; it was wrong from the beginning since it was an upstream issue :) |
I am not able to fix my error of UnCSS no style sheet found |
Same error. UnCSS: no stylesheets found as for @pawansoobhri |
Hi.
I'm trying grunt-uncss with no success so far.
If I remove grunt-uncss everything works fine. I tried with and without specifying the stylesheet. If I skip it I end up with a zero byte tidy.css file and no errors.
My source is here https://github.com/mpc-hc/mpc-hc.org/tree/grunt-uncss
Any help is appreciated, thanks!
PS. The task order in Gruntfile is a little weird at the moment because I wanted to get this working first. I'll switch to concatenate, uncss, then cssmin later.
The text was updated successfully, but these errors were encountered: