GRUNT UNCSS错误 [英] GRUNT UNCSS error

查看:52
本文介绍了GRUNT UNCSS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行grunt时,我总是出错,请问有人知道如何在php中使用UNCSS吗?

I keep getting error when I run grunt, dose anyone know how to use UNCSS with php ?

Fatal error: spawn C:\Users\**.**\Desktop\PhpstormProjects\**\node_modules\phantomjs\lib\phantom\phantomjs.exe ENOENT

我不确定如何解决此问题,我的UNCSS文件如下所示

Im not sure how to fix this problem, my UNCSS file looks like

 uncss: {
    dist: {
        options: {

            stylesheets  : ['css/clean.min.css'],
            style: 'compressed'
        },

        files: [
            //{ src: '*.html', dest: 'css/uncss/compiled.min.css'}
            {
                'css/app.clean.css': ['**/*.php']
            }
        ]
    }
},

非常感谢所有帮助

推荐答案

在Google进行了一些研究之后,我将得出结论,即您不能对uncss使用动态php文件(如我在上面的评论中所述).

After a few research in google, i will finish with conclusion that you can't use a dynamically php files for uncss (as i said in comment above).

您应该为uncss生成page的html结果,或者改为为页面使用链接.

You should generate the html result of page for uncss or use links for pages instead.

请阅读本文(这是有关Wordpress的,但您应该了解基本概念)

Please read this article (it's about Wordpress, but you should get the basic idea)

利亚姆·格拉迪(Liam Gladdy)博客文章,内容涉及uncss

这篇关于GRUNT UNCSS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆