Configure and run the vue framework in ubuntu (based on IDEA)

1. Configuration environment

1. Install nodejs

sudo apt install nodejs

Insert picture description here

test

nodejs -v

Insert picture description here

2. Install npm

sudo apt install npm

Insert picture description here

test

npm -v

Insert picture description here

3. Install cnpm

sudo npm install -g cnpm

Insert picture description here

If it is slow, use the following Taobao source to install

sudo npm install -g cnpm --registry=https://registry.npm.taobao.org

test

cnpm -v

Insert picture description here

2. Build a framework

1. Install vue

sudo cnpm install -g vue-cli

Insert picture description here

test

vue -V

Insert picture description here

2. New project

sudo vue init webpack vue-demo2

Insert picture description here

Enter the newly created project folder and install dependencies

cd vue-demo2
sudo cnpm install

Insert picture description here

run

sudo npm run dev

Insert picture description here

Browser find localhost:8080

Insert picture description here

3. Run someone else's vue shelf

1. Get a github clone, and most of them have installation tutorials and steps.
Insert picture description here
2. Open the command line directly in IDEA, which is this Terminal. Follow the above operations to install dependencies

npm install  

If an error is reported and the operation cannot continue, try cnpm
3. Run

npm run serve

Insert picture description here

Insert picture description here

4. IDEA's vue plugin

File-setting-Plugins searches for vue and installs it directly, then restart idea, you can recognize the vue suffix file
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41170600/article/details/108643770