Avoid conflicts in Yeoman generator

我怕爱的太早我们不能终老 提交于 2019-12-11 09:59:26

问题


I'd like to replace a partial in my app with a template when scaffolding with Yeoman. Everything seems to work out fine, but I get this conflict error during the scaffold.

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)

Is there a way to avoid this? I looked into passing a {status: 'force'} but that didn't seem to work.


回答1:


A couple of options I can see: 1. You can pass --force as an option to your yo command: yo mygenerator --force 2. can set generator.conflicter.force = true before calling the template function



来源:https://stackoverflow.com/questions/24492542/avoid-conflicts-in-yeoman-generator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!