【发布时间】:2016-02-23 14:52:26
【问题描述】:
我在运行 grunt 时总是出错,请问有人知道如何在 php 中使用 UNCSS 吗?
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']
}
]
}
},
非常感谢所有帮助
【问题讨论】:
-
我不确定 uncss 是否可以像您编写的 src: '/application/views/includes/header.php' 那样处理 php 文件
-
所以你认为只是 header.php ?
-
根据 grunt-uncss 插件文档 (github.com/addyosmani/grunt-uncss),您对 uncss 任务的配置可能有误。
-
感谢@Eria,我再次阅读,我知道他们使用进程 html,但这是一个 codeigniter php 项目
标签: php codeigniter gruntjs uncss