grunt ngtemplates任务100%cpu
grunt任务ngtemplates运行无限期(近一个小时,没有完成),CPU利用率为100%。如果我评论这个任务,那么构建完成。 使用ngtemplates执行构建任务,并在另一台机器上完成确定。 任何想法/线索非常感谢。grunt ngtemplates任务100%cpu
节点版本:0.10.29 咕噜-CLI:v0.1.13 咕噜:v0.4.5
ngtemplates: {
app: {
cwd: '<%= yeoman.app %>',
src: ['views/{,*/}*.html', 'views/inbox/{,*/}*.html' , 'scripts/directives/*.html'],
dest: 'scripts/templates.js',
options: {
usemin: 'scripts/scripts.js', // <~~ This came from the <!-- build:js --> block
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true, // Only if you don't use comment directives!
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
}
}
}
非常感谢,
我有同样的问题,我真的不知道,但应通过去除从消除线约73 .map (this.minify)
“node_modules /咕噜-角模板/任务/ LIB/compiler.js”
如果您找到干净的解决方案,请记得张贴;) – aemonge 2015-05-17 18:03:39
使用@伊西德罗-Martinez的这样来解决你可能会发现真正的问题。我的问题是我的JS上未检测到的语法错误。我已经能够找到它,感谢到temporarilly消除在previouse注释行:
我有同样的问题,我真的不知道,但应该可以解决通过去除消除了线约73 .map(this.minify)from“node_modules/grunt-angular-templates/task/lib/compiler.js”
我在使用grunt运行我的构建时遇到类似的问题,并且ngtemplates任务无法完成。
我可以确认上面注释掉“node_modules/grunt-angular-templates/task/lib/compiler.js”的第73行的答案是否允许完成任务。但是,这不太可能是问题所在(如果您评论该行,则会损失文件的缩小比例)。
对我来说,我的一个HTML文件中有HTML语法错误。我通过运行我的文件w3's HTML validator发现了这一点。修复语法错误之后,ngtemplates任务完成了。
如果您需要一些帮助,请发布您的Gruntfile.js /任务代码。 – 2014-08-28 16:12:34