Avoid conflicts in Yeoman generator

2019-08-11 16:00发布

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条回答
Summer. ? 凉城
2楼-- · 2019-08-11 16:52

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

查看更多
登录 后发表回答