You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Yo to generate content for new Git repositories. We have several in-house templates. Jobs to generate are run non-interactively through Jenkins. We'd like to be able to re-run our Yeoman templates on existing repositories without clearing their contents. In other words, if we have an updated template that adds a file, we'd like to add that file to our template and let our users re-run the Jenkins job and have that file added to the repository without overwriting any existing files.
Today, Yo prompts what you want to do when it finds a conflict. This doesn't work when running non-interactively. Yo has the --force switch, but that overwrites everything. This is not what we want. Users could easily have strayed from the defaults since the initially created their repository.
Because of this, we now have to write extra automation to add new files to repositories and we can't add them to the template. (Well, I guess we could, but then we'd have that file in two different places.)
Please add a --skip-existing or a --on-conflict <skip|overwrite|abort> switch to Yo so I can control what to do when handling conflicts.
The text was updated successfully, but these errors were encountered:
I wouldn't mind putting together a pull request for this feature. I just need help navigating to the right spot in the code. I looked in the yo module but couldn't find where the --force switch gets used.
We use Yo to generate content for new Git repositories. We have several in-house templates. Jobs to generate are run non-interactively through Jenkins. We'd like to be able to re-run our Yeoman templates on existing repositories without clearing their contents. In other words, if we have an updated template that adds a file, we'd like to add that file to our template and let our users re-run the Jenkins job and have that file added to the repository without overwriting any existing files.
Today, Yo prompts what you want to do when it finds a conflict. This doesn't work when running non-interactively. Yo has the
--force
switch, but that overwrites everything. This is not what we want. Users could easily have strayed from the defaults since the initially created their repository.Because of this, we now have to write extra automation to add new files to repositories and we can't add them to the template. (Well, I guess we could, but then we'd have that file in two different places.)
Please add a
--skip-existing
or a--on-conflict <skip|overwrite|abort>
switch to Yo so I can control what to do when handling conflicts.The text was updated successfully, but these errors were encountered: