Angularjs 使用grunt构建时,区域中不存在视图

Angularjs 使用grunt构建时,区域中不存在视图,angularjs,gruntjs,yeoman,yeoman-generator-angular,Angularjs,Gruntjs,Yeoman,Yeoman Generator Angular,我有一个棱角分明的应用程序,我用yeoman搭建了这个应用程序 当我尝试使用grunt构建时,dist/ 这就是我的Gruntile的样子 htmlmin: { dist: { options: { collapseWhitespace: false, conservativeCollapse: false, collapseBooleanAttributes: true, removeC

我有一个棱角分明的应用程序,我用
yeoman
搭建了这个应用程序

当我尝试使用grunt构建时,
dist/

这就是我的Gruntile的样子

htmlmin: {
      dist: {
        options: {
          collapseWhitespace: false,
          conservativeCollapse: false,
          collapseBooleanAttributes: true,
          removeCommentsFromCDATA: true
        },
        files: [{
          expand: true,
          cwd: '<%= yeoman.dist %>',
          src: ['*.html'],
          dest: '<%= yeoman.dist %>'
        }]
      }
    },

    ngtemplates: {
      dist: {
        options: {
          module: 'tweetSearchApp',
          htmlmin: '<%= htmlmin.dist.options %>',
          usemin: 'scripts/scripts.js'
        },
        cwd: '<%= yeoman.app %>',
        src: 'views/{,*/}*.html',
        dest: '.tmp/templateCache.js'
      }
    },

但是我仍然看不到在我的
dist/
文件夹中生成的任何视图文件夹


请帮助我进行配置

请查看此链接

Grunt正在使用$templateCache缓存HTML模板。这意味着您的所有Html文件都包含在脚本*.js文件中,该文件是在dist/scripts/script*.js中生成的


这就是为什么没有在dist/

中生成视图目录,并在gruntfile.js中进行更改

htmlmin。files.src:['.html','{,/}*.html']和

copy.dist.files.src:[ “.{ico,png,txt}”, “.htaccess”, “.html”, “{,/}.html”, 'images/{,/}.{webp}', '样式/字体/{,/}.*' ]


通过这种方式,它对我很有效。

请解释为什么这样做应该有效&尝试格式化代码如果我的构建无法安装特定的模板404,而它在本地构建之前工作正常,有没有好的方法调试它?
Running "ngtemplates:dist" (ngtemplates) task
File .tmp/templateCache.js created.
>> Usemin has not created uglify.generated yet!
Running "usemin:html" (usemin) task
Replaced 2 references to assets

Running "usemin:css" (usemin) task
Replaced 2 references to assets

Running "usemin:js" (usemin) task
Replaced 2 references to assets

Running "htmlmin:dist" (htmlmin) task
Minified 2 files