Grunt cssmin没有生成main.css

时间:2015-01-09 02:29:56

标签: gruntjs grunt-usemin grunt-contrib-cssmin grunt-build-control

当我运行grunt build --verbose时,它告诉我>> Destination not written because minified CSS was empty.。我也注意到Files: [no src] -> dist/styles/main.css是这样的,所以如果没有来源[no src],那就没有任何意义。至少这是我现在的想法。结果是没有生成 main.css

为什么会这样?

Running "cssmin:generated" (cssmin) task
Verifying property cssmin.generated exists in config...OK
Files: bower_components/foundation/css/foundation.css, bower_components/normalize.css/normalize.css -> dist/styles/vendor.css
Files: [no src] -> dist/styles/main.css
Options: report="min"
Reading bower_components/foundation/css/foundation.css...OK
Reading bower_components/normalize.css/normalize.css...OK
Writing dist/styles/vendor.css...OK
File dist/styles/vendor.css created: 194.3 kB → 138.61 kB
>> Destination not written because minified CSS was empty.

这是一个包含我的 Gruntfile.js

的要点

https://gist.github.com/3lfist/86f1cc3076e01ef5a905

这是我的 index.html ,其中包含usemin块

https://gist.github.com/3lfist/c39eedeb7c8ef6adae48

0 个答案:

没有答案