Skip to content
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

feat: add option merge to command create #4828

Merged
merged 1 commit into from Jan 6, 2020

Conversation

zyy7259
Copy link
Contributor

@zyy7259 zyy7259 commented Nov 11, 2019

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

  • Usage: vue create --merge .
  • This option works like the --force option.

@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch from a6bdd73 to bb16ff1 Compare November 14, 2019 01:44
@sodatea
Copy link
Member

sodatea commented Nov 14, 2019

I don't feel like adding this feature. Because the end result is still unpredictable and the directory could still get messed up.
A warning on the overriding might suffice.

@zyy7259
Copy link
Contributor Author

zyy7259 commented Nov 14, 2019

What I want to do with this option is auto generating projects by some tools based on vue-cli.

The tool I used needs to write some files before calling vue-cli.

I just want to skip the prompt, and merge files immediately.

@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch 2 times, most recently from c66fdd5 to 8140cf7 Compare November 30, 2019 15:39
@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch 2 times, most recently from e1363c7 to 15eae39 Compare December 9, 2019 02:27
@pksunkara
Copy link
Contributor

I agree with @sodatea here. If you want to, you can create a new folder and merge those 2 folders with some other tools locally.

@zyy7259
Copy link
Contributor Author

zyy7259 commented Dec 13, 2019

By default, without any cli options, if the target dir is existing, @vue/cli will prompts the user to either delete the target folder or merge with it.

And there is an option --force to skip the prompt and delete the target folder. So I just want to add an option --merge to skip the prompt and merge with the target folder.

Actually I'm writing a tool which combined @vue/cli with a custom package manager. I need to write some info into the package.json in the target folder first. And during the creation of the target project, these info will be used by the custom package manager to installing deps.

So I just want this --merge option to skip the prompt and automate the whole creation procedure.

@pksunkara
Copy link
Contributor

That actually sounds better. If you are okay, we can merge this @sodatea

@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch from 15eae39 to 5fcb8bf Compare December 18, 2019 12:15
@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch from 5fcb8bf to ec8e8a8 Compare December 31, 2019 09:00
@zyy7259 zyy7259 force-pushed the add-option-merge-to-command-create branch from ec8e8a8 to 5ae298a Compare January 5, 2020 13:40
@pksunkara
Copy link
Contributor

This is still failing. You think there's an issue with your code?

FAIL packages/@vue/cli/__tests__/Upgrader.spec.js

@pksunkara
Copy link
Contributor

Never mind, it has been happening on dev too

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.

None yet

3 participants