当我运行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块