[Linux] Quickly build a large single-page application based on Vue

Development environment: Ubuntu 20.0.4

One, the installation of npm

sudo apt install npm

Second, the installation of cnpm

  1. Installation command:
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org  
  1. View version:
npm -v

3. Upgrade npm

sudo cnpm install npm -g

4. Upgrade or install cnpm

sudo npm install cnpm -g

Fourth, the installation of Vue

cnpm install vue

Five, quickly build large single-page applications

  1. Install vue-cli globally
sudo cnpm install --global vue-cli
  1. Create a new project based on the webpack template
sudo vue init webpack my-project
  1. Install and run

a. Enter the project

cd my-project

b. Installation project

sudo cnpm install

c. Run the project

cnpm run dev

Six, run screenshots

 DONE  Compiled successfully in 4494ms                                                                               下午1:10:16

 I  Your application is running here: http://localhost:8080

Browser access:

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43073558/article/details/108949719