Introducing vue-cli
CLI stands for Command Line Interface. A cli
runs one or multiple commands successively in a command line interface. Vue.js also has a cli
which, when installed, makes it super easy to spin up a project. We will be using a vue-cli
in this book to create the Vue.js application. Let's install vue-cli
with the following command. You can execute this command in your root folder:
$ npm install -g vue-cli
Initializing projects with vue-cli
Let's go ahead with creating a new project folder for our movie rating application. We will call it movie_rating_app
. Go to the directory where you want to create your application in the Terminal and run the following:
$ vue init webpack movie_rating_app
The preceding command initializes an application with all the dependencies that a Vue.js project requires. It will ask you a few questions about the project setup, to which you can answer either y, as in yes, or n, as in no:
- Vue build: You will find two options to build the Vue.js app: runtime...