使用 webapp 生成器,我创建了一个 yeoman 项目。我在“模板”目录的 app 文件夹中有一些 html 模板。运行 grunt build 时,我能够使这些文件得到更新;但是,我无法更新对“脚本”目录中 js 文件中 html 模板的引用。是否可以在 js 文件上使用 usemin 任务,还是首先修改 js 文件使用的 html 模板是个坏主意?
构建前:-root -app index.html -templates template1.html -scripts script1.js(使用template1.html)
构建后:-root index.html -templates 43643.template1.html -scripts 345345.script1.js(不更新 ref 到 template1.html)
我的 gruntfile 非常基本,只是在 rev 任务中添加了目录。任何建议,将不胜感激。提前致谢。