【发布时间】:2016-08-09 20:03:29
【问题描述】:
我不断收到 UNCSS 的此错误:'Warning: Destination (dist/css/main.css) not written because src files were empty. Use --force to contine. Aborted due to warnings.
我相信它可以正常运行任务并且设置正确。我可以将 grunt 用于其他事情。
在 gruntfile.js 中,我包含:grunt.loadNpmTasks('grunt-uncss');
和
uncss: {
dist: {
files: {
'dist/css/main2.css': ['../index.html']
}
}
}
我不确定出了什么问题,但我认为是路径问题,但事实就是如此。我也在使用 SCSS,所以也许它需要一个原始 css 作为SRC?我已经尝试在没有 Grunt 的情况下重新安装 PhantomJS 和原始 UNCSS,但我无处可去!有什么想法吗?
【问题讨论】: