vue: Set up the vue/cli

(*1*)

Teacher: (*3*) A method that we have got constructed this application is okay for us studying Vue, it is not the best way we will be able to normally construct. We use the Vue CLI, or command-line interface, and the construct gear that come in conjunction with that. How will we do this?

[0:14] I’ll, npm set up -g, for globally, @vue/cli. As soon as that is completed, I will do, vue –version, to ensure I’ve it put in. We will be able to see I do, and now, I’ll create. I’ll do, vue create TicketApp. We wish to use Vue 3, so we will pass down and we will make a choice Vue 3, and we will see this TicketApp folder.

[0:46] This folder is now reasonably complete. We’ve a public folder, which has were given an index.html document, which is the place our Vue application will probably be fastened on, just like we did in our instance application. We’ve a supply listing, which has a primary.js document, just like we have now had earlier than, however it is uploading from this new document, this app.vue.

[1:09] On this .vue document, there are three portions to it. There is the template, which is the html that makes up our Vue document. There is the script, which is the JavaScript that would possibly make up the common sense to our element. There is the way, which is the CSS that we will make it up. Every element will also be a Vue document. We will even have template, scripts, and types.

[1:36] A scoped belongings like which means that the CSS in this is most effective going to use to the element. It may not practice globally. Even supposing I am the usage of h3 right here, that h3 styling will most effective practice to the h3 this is on this element. It may not practice any place else.