Qingquan-Li / blog

My Blog
https://Qingquan-Li.github.io/blog/
132 stars 16 forks source link

use Vue CLI to create a project #174

Open Qingquan-Li opened 3 years ago

Qingquan-Li commented 3 years ago

References:


01. Install Node.js

download .pkg from https://nodejs.org/

$ node -v 
v14.17.5

$ npm -v
6.14.14

02. Install Vue CLI globally

CLI: Command-Line Interface

$ [sudo] npm install -g @vue/cli
$ vue --version               
@vue/cli 4.5.13

03. Create a Project

$ vue create project-name

You can also create and manage projects using a graphical interface with the vue ui command:

$ vue ui

04. Run CLI Service

$ npm run serve
...
App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://192.168.0.100:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.