问题
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