Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php GRUNT UNCSS错误_Php_Codeigniter_Gruntjs_Uncss - Fatal编程技术网

Php GRUNT UNCSS错误

Php GRUNT UNCSS错误,php,codeigniter,gruntjs,uncss,Php,Codeigniter,Gruntjs,Uncss,我在运行grunt时不断出错,有人知道如何在php中使用UNCS吗 Fatal error: spawn C:\Users\**.**\Desktop\PhpstormProjects\**\node_modules\phantomjs\lib\phantom\phantomjs.exe ENOENT 我不知道如何解决这个问题,我的UNCSS文件看起来像 uncss: { dist: { options: { stylesheets : [

我在运行grunt时不断出错,有人知道如何在php中使用UNCS吗

Fatal error: spawn C:\Users\**.**\Desktop\PhpstormProjects\**\node_modules\phantomjs\lib\phantom\phantomjs.exe ENOENT
我不知道如何解决这个问题,我的UNCSS文件看起来像

 uncss: {
    dist: {
        options: {

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

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

非常感谢所有的帮助

在谷歌做了一些研究之后,我将得出结论,您不能将动态php文件用于UNCS(正如我在上面的评论中所说的)

您应该为UNCS生成页面的html结果,或者为页面使用链接

请阅读这篇文章(它是关于Wordpress的,但是你应该了解基本的想法)


在谷歌做了一些研究之后,我将得出结论,您不能将动态php文件用于UNCS(正如我在上面的评论中所说的)

您应该为UNCS生成页面的html结果,或者为页面使用链接

请阅读这篇文章(它是关于Wordpress的,但是你应该了解基本的想法)


我不确定uncss是否可以像您写的src:'/application/views/includes/header.php'那样处理php文件,所以您认为只处理header.php?根据grunt uncss插件文档(),您对uncss任务的配置可能是错误的。谢谢@Eria,我再次通读,我知道他们使用的是过程html,但是这是一个codeigniter php项目,我不确定uncss是否可以像你写的src:'/application/views/includes/header.php'那样处理php文件,所以你认为只是header.php?根据grunt uncss插件文档(),你对uncss任务的配置可能是错误的。谢谢@Eria,我再次通读,我知道他们使用的是过程html,但这是一个codeigniter php项目