Getting Starting With Vue.js Quickly With Just 3 STEPS!
STEP 01: First you need to install Node.js & NPM (Node Package Manager) onto your computer if you haven’t done so already.
Check to see if you have installed node with the following command on the Terminal / Command Prompt:
node -v
STEP 02: Install vue
using vue cli
globally (-g) which is the easiest way to get started with Vue.
npm install -g vue-cli
STEP 03: Initialize Vue Project via Web Pack with the following command and change my-project
to your project name.
vue init webpack my-project
Next, you will be asked a series of questions:
- Project name (yourprojectname) – The name must be URL friendly (no space)
- Project description (A Vue.js project)
- Author (SoftAuthor)
- Vue build (Use arrow keys) ❯ Runtime + Compiler: recommended for most users
- Install vue-router? (Y/N) ❯ Yes
- Use ESLint to lint your code? (Y/N) ❯ No
- Set up unit tests (Y/N) ❯ No
- Setup e2e tests with Nightwatch? (Y/N) ❯ No
- Should we run `npm install` for you after the project has been created? (recommended) (Use arrow keys) ❯ Yes, use NPM
Once you hit enter, it will start downloading and installing dependencies which will take a minute or two.
After that cd to your project.
cd yourprojectname
Then,
npm run dev
At this stage, your project will be compiled and Vue will give you the localhost address. Go ahead and launch it on the browser.