当使用 Yeoman 搭建脚手架时,我想用模板替换应用程序中的部分内容。一切似乎都很顺利,但我在脚手架期间遇到了这个冲突错误。
this.template(
'conditional-files/html/_signup.email.html', 'app/html/partials/_main.signup.html'
);
conflict app/html/partials/_main.signup.html
[?] Overwrite app/html/partials/_main.signup.html? (Ynaxdh)
有办法避免这种情况吗?我考虑过传递 {status: 'force'} 但这似乎不起作用。
我可以看到几个选项:
1. 您可以将 --force 作为选项传递给 yo 命令:yo mygenerator --force
2.可以在调用模板函数之前设置generator.conflicter.force = true
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)