【发布时间】:2016-05-12 21:08:49
【问题描述】:
我在 gruntfile.js 中写道:
// Css Purge
css_purge: {
options: {
"verbose": false,
"no_duplicate_property": true,
},
files: {
src: 'css/bigfile.css',
dest: 'css/purged.css'
},
}
只是为了测试 bigFile.css 是:
body {color: red;}
body, p {color:red;}
p {color: red; font-size: 24px;}
#test p {color: red;}
所以终端消息是:
Running "css_purge:files" (css_purge) task
"css/" has been created
Thu May 12 2016 01:33:27 GMT-0400 (EDT) Success! css/bigfile.css : css/purged.css
但是新文件purged.css和bigFile.css是一样的
【问题讨论】:
-
您可以发布您的 css 文件吗?
-
嗨,Louis,我们刚刚更新了 CSS-Purge 的核心,它会满足你的要求:rbtech.github.io/css-purge,你可以同时独立使用它,直到grunt 插件已更新。