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

Creating a vue file with vue-cli #339

Closed
wants to merge 3 commits into from
Closed

Conversation

abdullah
Copy link

@abdullah abdullah commented Feb 8, 2017

I wrote a patch code which I use in my Vue projects.

It creates vue files from terminal where the user define specific path or default path src/components.

I have implemented code for vue-cli

https://github.com/abdullah/cliv

@posva
Copy link
Member

posva commented Feb 8, 2017

Hi, thanks for sharing!

I don't think this solution is flexible enough. While we may add this feature in the future, it may be a better idea to simply use something like plop in the template and add some npm scripts to generate the files

@abdullah
Copy link
Author

abdullah commented Feb 8, 2017

plop is a third party tool but the thing I am trying to do in here will be included in Vue Cli itself. I found it useful to create new component files. Also you mentioned that this solution is not flexible enough. I can understand that however if you are willing to accept this kind of thing into Cli I can try to make it more flexible. Let me know.

@yyx990803
Copy link
Member

Thanks for the PR - however, the general philosophy of vue-cli is that it is only responsible for scaffolding the initial project - project-specific tasks are delegated to the scripts that are contained in the projects themselves. This allows for more flexibility. For example a project-specific scaffold command can eliminate the need for having to specify a folder name, but if it's done in vue-cli the folder name always need to be specified because we don't know which template the user used.

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

Successfully merging this pull request may close these issues.

3 participants