Gruntjs “无法写入”;“未定义”;grunt期间的文件:htmlrefs构建
安装看起来不错,但由于某种原因,它无法看到index.html文件? 我做错了什么?cdnify在这之前就运行了,它没有问题,实际上除了htmlrefs之外的所有东西都工作得很好(除了cdnify不会与angular1.2.12一起工作!) 咕噜声输出Gruntjs “无法写入”;“未定义”;grunt期间的文件:htmlrefs构建,gruntjs,Gruntjs,安装看起来不错,但由于某种原因,它无法看到index.html文件? 我做错了什么?cdnify在这之前就运行了,它没有问题,实际上除了htmlrefs之外的所有东西都工作得很好(除了cdnify不会与angular1.2.12一起工作!) 咕噜声输出 Running "htmlrefs:dist" (htmlrefs) task Warning: Unable to write "undefined" file (Error code: undefined). Use --force to c
Running "htmlrefs:dist" (htmlrefs) task
Warning: Unable to write "undefined" file (Error code: undefined). Use --force to continue.
Gruntfile
htmlrefs: {
dist: {
src: '<%= yeoman.dist %>/index.html'
}
}
grunt.registerTask('build', [
'clean:dist',
'useminPrepare',
'concurrent:dist',
'autoprefixer', // For css files
'concat',
'preprocess:js', // Remove DEBUG code from production builds
'preprocess:html', // Remove DEBUG code from production builds
'ngmin',
'copy:dist',
'cdnify',
'htmlrefs',
'cssmin',
'uglify',
'rev',
'usemin'
]);
htmlrefs:{
地区:{
src:“/index.html”
}
}
grunt.registerTask('build'[
“清洁区”,
“使用MinPrepare”,
'并发:dist',
'autoprefixer',//用于css文件
"海螺",,
'preprocess:js',//从生产版本中删除调试代码
'preprocess:html',//从生产生成中删除调试代码
"ngmin",,
'副本:dist',
“cdnify”,
“htmlrefs”,
“cssmin”,
"丑",,
“rev”,
“usemin”
]);
解决方案是明确定义dest:
htmlrefs:{
地区:{
src:“/index.html”,
dest:“/index.html”
}
}
没有执行此操作,但在明确指定后,我的构建已修复。的路径正确吗?“/index.html”?您可以使用
--verbose
选项进行检查