What is Vue Js

VueJS is an open source progressive JavaScript framework used to develop interactive web interfaces. It is one of the famous frameworks used to simplify web development. VueJS focusses on the view layer. It can be easily integrated into big projects for front-end development without any issues.

The installation for VueJS is very easy to start with. Any developer can easily understand and build interactive web interfaces in a matter of time. VueJS is created by Evan You, an ex-employee from Google. The first version of VueJS was released in Feb 2014. It recently has clocked to 64,828 stars on GitHub, making it very popular

Step For Install Vue Js

Step 1

npm install -g vue-cli

This command will install vue-cli globally. Think of it like buying a tool, which you purchase once(free in our case) and can use it any number of times. So for setting up another project from next time, this command is not required. So number of steps for setting up any new project is actually 4!

Step 2

Syntax: vue init <template-name> <project-name>
example: vue init webpack-simple new-project

The above command pulls a webpack template, prompts for some information and generate a project in directory/folder new-project
You can choose from various templates(simple, webpack, pwa etc.) from here.
And the most interesting part is, this is the only command you need to know, because next 3 commands will be shown to you in the command line(see below) after completing this step.

Step 3

cd new-project

Change directory to your project folder

Step 4

npm install

Install all the dependencies required by the template as listed in package.json file. This step may take a minute or two to get all the dependencies.

Step 5

npm run dev

This command will start your local http server, open the browser and your default hosted web page will be shown.

You can check you have the right version (3.x) with this command:

vue --version

To use Vue from the latest source code on GitHub, you will have to build it yourself!

git clone https://github.com/vuejs/vue.git node_modules/vue 

cd node_modules/vue npm 

install npm 

run build
Congrats! your project is ready to use.

You may also like

Leave a Reply