Setting up the Vue project
Now that we've learned the basics about computed properties and getters and setters, we are ready to look deeper at the component parts that we will need and create the project.
To create the project, we use the Vue CLI again. This time, instead of selecting the default options, we must choose a few options. But before we do that, we will create a project folder called vue-example-ch3-slider-puzzle
. Then, we must go into the folder and run the following commands with npm
:
- First, we must install the Vue CLI globally so that we can create and run our project with it:
npm install -g @vue/cli@next
- Now, we can go into our project folder and run the following command to create our project:
vue create .
Equivalently, we can run the following commands with Yarn:
- First, we must install the Vue CLI globally so that we can create and run our project with it:
yarn global add @vue/cli@next
- Then, we can go into our project folder and...