Skip to content

feat!: confirm before invoke/add/upgrade if project has uncommitted changes #4275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 12, 2019

Conversation

haoqunjiang
Copy link
Member

No description provided.

@haoqunjiang haoqunjiang changed the title feat!: confirm before invoke/add/upgrade if project has committed changes feat!: confirm before invoke/add/upgrade if project has uncommitted changes Jul 12, 2019
@haoqunjiang haoqunjiang merged commit 7fc0f84 into vuejs:dev Jul 12, 2019
@davidsickmiller
Copy link

davidsickmiller commented Apr 26, 2020

I've now learned how vue plugin generators work, so I no longer need additional warnings, but I wanted to suggest an idea to be more helpful to new users:

It's pretty intuitive that adding a module (e.g. "vue add router") will add packages to package.json, package-lock.json, and node_modules. It's not as obvious, but probably OK, that it will add new files under src/. It's comparatively most surprising that it will also overwrite existing files under src/.

I think it would be nice to change this warning to:

  1. Only be displayed if it's going to overwrite an existing file, and if so
  2. List which files will be overwritten. Also,
  3. Show the warning even if all files have been committed to git.

Regarding #3, even if I have the previous version in my repo, I think it's nice to know up front that I'll need to manually merge certain files, rather than running git diff after each vue add to find out what happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants