Start Vue Project from existing template

Asked

Viewed 428 times

0

It is possible to start a project Vue from an existing template? I want to create a template with all the necessary dependencies and initial settings (as well as pages and etc), so that always, when making a new project, you can start from this template.

Ex: vue init MyTemplate NomeDoProjeto

1 answer

1


I don’t know if I got it right, or if my answer is half dumb, but I think you’re looking for the Vue-cli. If it’s not what you’re looking for, let me know that I delete the answer.

According to the documentation, to install it you need to execute the commands below:

npm install -g @vue/cli
# or
yarn global add @vue/cli

vue create my-project

There are several boilerplates of the Vue-cli, such as, for example, the Vuetify has several like this vue init vuetifyjs/webpack.

You can even create your own if you want with the command vue init username/repo my-project, where the username is your "username" on Github, and "Repo" is the name of the repository you created.

  • That’s basically what I wanted, to create my own template and use, I did that and tried to start with it, but it didn’t work, from the following error vue-cli · ENOENT: no such file or directory, scandir 'C:\Users\Rafael\.vue-templates\RafaelAugustoS-Template\template

  • So, you threw what’s on your computer into a repository on Github? If yes, please pass me the link from the repository that after work I do some tests and try to find the problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.