-
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
Using Grunt-uncss with WordPress #180
Comments
I have used UnCSS in several Wordpress builds using version 0.4.3 without any issues, works great in fact. However, with 0.4.4 I get the error, 'Warning: Destination (wp-content/themes/rjrstudios/dist/css/rjr_theme.clean.css) not written because src files were empty. Use --force to continue.' The configuration which is the same as previous builds apart from the file dirs is below. I used this workflow as a base, https://gladdy.uk/blog/2014/04/13/using-uncss-and-grunt-uncss-with-wordpress/, developing within a local MAMP environment. The UnCSS config in the Gruntfile.js is as follows: uncss: {
dist: {
options: {
ignore : ['.hidden-xs'],
stylesheets : ['wp-content/themes/rjrstudios/src/css/bootstrap.css', 'wp-content/themes/rjrstudios/src/css/rjr_theme.css'],
ignoreSheets : [/fonts.googleapis/],
urls : [],
},
files: {
'wp-content/themes/rjrstudios/dist/css/rjr_theme.clean.css': ['http://localhost/RJRStudios/']
}
}
}, The 'urls' value gets overwritten by load_sitemap_and_uncss task. |
If anyone makes this to work again, please make a PR with the doc changes to add in our README.md. |
Is there anybody who solved the problem "'Warning: Destination (file path) not written because src files were empty. Use --force to continue.' ? I need a help. Thank you. |
Hi,
I'd love to use this on several WordPress sites, however, the site linked in your Readme for the tutorial & gruntfile is not working.
Any help/tips/suggestions/guidance would be highly appreciated! Thanks!
https://github.com/sboodhoo/Grunt-UnCSS-WordPress
The text was updated successfully, but these errors were encountered: