-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Add '--force' flag to 'vue init' command #708
Comments
Imho we should rather provide a way to skip the inquirer prompt completely and load some predefined answers from some .json file or something. Kind of what I implemented in vuejs-templates/webpack#1218 |
The new version in
|
@yyx990803 or @LinusBorg But i can't use vue create template-url ? So what i'm going to do if i need to init template from repo and skip prompts? |
The old 2.x functionality can be re-added with a plugin: https://cli.vuejs.org/guide/creating-a-project.html#using-the-gui We won't add any new features to it, though. |
Problem:
When testing templates, it's a frequent cause of headaches when testing.
Currently in the template test.sh scripts, they use the
yes
command piped to thevue init
, which doesn't work.Solution
To workaround this, we could add a
--force
flag that will send a new line character to each inquirer prompt.We could use the
mock-stdin
package for sending the input to the prompt.There is a PR coming shortly, fully tested with the Vue Webpack template using both the
--force
and the-f
flag.The text was updated successfully, but these errors were encountered: