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

Using Grunt-uncss with WordPress #180

Open
brianjking opened this issue Dec 23, 2015 · 3 comments
Open

Using Grunt-uncss with WordPress #180

brianjking opened this issue Dec 23, 2015 · 3 comments
Labels

Comments

@brianjking
Copy link

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

@RJRandell79
Copy link

RJRandell79 commented Dec 24, 2015

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.

@XhmikosR
Copy link
Member

XhmikosR commented Jul 9, 2016

If anyone makes this to work again, please make a PR with the doc changes to add in our README.md.

@heathera2016
Copy link

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.

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

No branches or pull requests

4 participants