2014-03-07 22 views
0

設置看起來不錯,但是因爲某些原因,它無法看到index.html文件? 我做錯了什麼? cdnify右跑在此之前,它的工作沒有問題,其實除了htmlrefs一切工作就好了(除了cdnify不會與angular1.2.12工作!)grunt期間無法寫入「undefined」文件:htmlrefs build

咕嚕輸出

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' 
]); 
+0

「<%= yeoman.dist%>/index.html''的路徑是否正確?您可以使用'--verbose'選項進行檢查 – krampstudio

回答

1

的解決方案是顯式地定義DEST:

個htmlrefs:{ DIST:{ SRC: '<%= yeoman.dist%>/index.html中', DEST: '<%= yeoman.dist%>/index.html中' } }

example I drew my setup from沒有這樣做,但明確指定後,我的構建已修復。