我目前有一个问题,我的 grunt-contrib-cssmin 任务需要将近 10 分钟才能完成。这个问题是在我将 grunt 和所有插件更新到当前版本后发生的。我已经将近一年没有更新它们了。在更新之前,cssmin 任务大约需要 5 秒才能完成。
更新后运行时间增加的原因可能是什么?我的任务定义是:
cssmin: {
target: {
options: {
banner: '/*! app.min.css <%= grunt.template.today("dd-mm-yyyy") %> */\n',
filename: 'app.min.' + grunt.template.today("ddmmyyyyHHMMss") + '.css'
},
files: {
'app/css/<%= cssmin.target.options.filename %>': [
'app/lib/bower_components/angular-motion/dist/angular-motion.css',
'app/lib/bower_components/ng-sortable/dist/ng-sortable.min.css',
'app/lib/bower_components/pines-notify/pnotify.core.css',
'app/lib/bower_components/pines-notify/pnotify.picon.css',
'app/lib/bower_components/pines-notify/pnotify.buttons.css',
'app/lib/bower_components/pines-notify/pnotify.history.css',
'app/lib/bower_components/angular-bootstrap-colorpicker/css/colorpicker.css',
'app/lib/bower_components/ng-sortable/dist/ng-sortable.min.css',
'app/lib/patches/ui.dynatree.css',
'app/lib/bower_components/selectize/dist/css/selectize.bootstrap3.css',
'app/lib/bower_components/angular-ui-grid/ui-grid.css',
'app/lib/bower_components/angular-resizable/angular-resizable.min.css',
'app/css/screen.css',
'app/css/ie.css'
]
}
}
},